mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
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
This commit is contained in:
21
compiler/testData/loadJava8/compiledJava/ParameterNames.java
vendored
Normal file
21
compiler/testData/loadJava8/compiledJava/ParameterNames.java
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// 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) {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user