fix for KT-1515 wrong loading of annotations
This commit is contained in:
@@ -81,7 +81,8 @@ public abstract class AnnotationCodegen {
|
||||
CompileTimeConstant<?> compileTimeConstant = bindingContext.get(BindingContext.COMPILE_TIME_VALUE, valueArguments.get(0));
|
||||
assert compileTimeConstant != null;
|
||||
|
||||
annotationVisitor.visit(entry.getKey().getName(), compileTimeConstant.getValue());
|
||||
Object value = compileTimeConstant.getValue();
|
||||
annotationVisitor.visit(entry.getKey().getName(), value);
|
||||
}
|
||||
|
||||
annotationVisitor.visitEnd();
|
||||
|
||||
@@ -72,8 +72,8 @@ public class IntrinsicMethods {
|
||||
myProject = project;
|
||||
myStdLib = stdlib;
|
||||
|
||||
namedMethods.put("\"kotlin.javaClass.function\"", new JavaClassFunction());
|
||||
namedMethods.put("\"kotlin.javaClass.property\"", new JavaClassProperty());
|
||||
namedMethods.put("kotlin.javaClass.function", new JavaClassFunction());
|
||||
namedMethods.put("kotlin.javaClass.property", new JavaClassProperty());
|
||||
|
||||
List<String> primitiveCastMethods = OperatorConventions.NUMBER_CONVERSIONS.asList();
|
||||
for (String method : primitiveCastMethods) {
|
||||
@@ -246,7 +246,10 @@ public class IntrinsicMethods {
|
||||
if (annotations != null) {
|
||||
for (AnnotationDescriptor annotation : annotations) {
|
||||
if("Intrinsic".equals(annotation.getType().getConstructor().getDeclarationDescriptor().getName())) {
|
||||
intrinsicMethod = namedMethods.get(annotation.getValueArguments().get(0).getValue());
|
||||
Object value = annotation.getValueArguments().get(0).getValue();
|
||||
intrinsicMethod = namedMethods.get(value);
|
||||
if(intrinsicMethod != null)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user