[FIR] Create synthetic properties for members of java annotations
#KT-41939 Fixed
This commit is contained in:
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// ISSUE: KT-41939
|
||||
|
||||
// FILE: Ann.java
|
||||
|
||||
public @interface Ann {
|
||||
String value()
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun test(ann: Ann) {
|
||||
ann.value
|
||||
ann.<!UNRESOLVED_REFERENCE!>value<!>() // should be an error
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
FILE: main.kt
|
||||
public final fun test(ann: R|Ann|): R|kotlin/Unit| {
|
||||
R|<local>/ann|.R|/Ann.value|
|
||||
R|<local>/ann|.<Unresolved name: value>#()
|
||||
}
|
||||
Generated
+5
@@ -2031,6 +2031,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
public void testNoBackingFieldForExtension() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/noBackingFieldForExtension.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticPropertiesForJavaAnnotations.kt")
|
||||
public void testSyntheticPropertiesForJavaAnnotations() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/syntheticPropertiesForJavaAnnotations.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/references")
|
||||
|
||||
+5
@@ -2031,6 +2031,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
public void testNoBackingFieldForExtension() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/noBackingFieldForExtension.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticPropertiesForJavaAnnotations.kt")
|
||||
public void testSyntheticPropertiesForJavaAnnotations() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/properties/syntheticPropertiesForJavaAnnotations.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/references")
|
||||
|
||||
Reference in New Issue
Block a user