Set source elements for java annotation parameters

This commit is contained in:
Pavel V. Talanov
2014-07-09 16:30:08 +04:00
parent 930ea88e25
commit 8523e18afc
3 changed files with 10 additions and 1 deletions
@@ -203,7 +203,7 @@ public class LazyJavaClassMemberScope(
method.hasAnnotationParameterDefaultValue(),
// Nulls are not allowed in annotation arguments in Java
varargElementType?.let { TypeUtils.makeNotNullable(it) },
SourceElement.NO_SOURCE
c.sourceElementFactory.source(method)
))
}
@@ -0,0 +1,4 @@
java.lang.annotation.Retention(va<caret>lue = java.lang.annotation.RetentionPolicy.RUNTIME)
annotation class Anno()
// REF: (in java.lang.annotation.Retention).value()
@@ -137,6 +137,11 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest
doTest("idea/testData/resolve/references/InSecondClassObject.kt");
}
@TestMetadata("JavaAnnotationParameter.kt")
public void testJavaAnnotationParameter() throws Exception {
doTest("idea/testData/resolve/references/JavaAnnotationParameter.kt");
}
@TestMetadata("JavaEnumEntry.kt")
public void testJavaEnumEntry() throws Exception {
doTest("idea/testData/resolve/references/JavaEnumEntry.kt");