Files
kotlin/compiler/testData/loadJava8/compiledJava/ParameterNames.java
Alexander Udalov 1464a4ac58 Load Java parameter names correctly in BinaryJavaMethod
PSI-based implementation (accessible via
`-Xuse-old-class-files-reading`) loads parameter names from the
"MethodParameters" attribute if it's present, so our own implementation
should as well.

This metadata doesn't seem supported in the java.lang.model.element API
though, so SymbolBasedValueParameter (which is used in `-Xuse-javac`)
will continue to have incorrect behavior for now

 #KT-25193 Fixed
2018-07-18 18:15:09 +02:00

22 lines
496 B
Java
Vendored

// JAVAC_OPTIONS: -parameters
package test;
public class ParameterNames {
public ParameterNames(long longConstructorParam, String stringConstructorParam) {}
public void foo(long longMethodParam, int intMethodParam) {}
static void bar(ParameterNames staticMethodParam) {}
class Inner {
public Inner(double doubleInnerParam, Object objectInnerParam) {}
}
enum Enum {
E(0.0, "");
Enum(double doubleEnumParam, String stringEnumParam) {}
}
}