[K2] Properly report diagnostics on const properties with Java usages

#KT-63752
#KT-59894
#KT-61920 Fixed
This commit is contained in:
Ivan Kylchik
2023-11-21 15:15:58 +01:00
committed by Space Team
parent 9f64edb31e
commit 1125891a13
18 changed files with 255 additions and 83 deletions
@@ -1,25 +0,0 @@
// FILE: Test.java
public class Test {
public static int i1 = 1;
public static final int i2 = 1;
public static final int i3 = i1;
public static final int i4 = i2;
public static int i5 = i1;
public static int i6 = i2;
public final int i7 = 1;
}
// FILE: a.kt
annotation class Ann(vararg val i: Int)
@Ann(
<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>Test.i1<!>,
Test.i2,
Test.i3,
Test.i4,
<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>Test.i5<!>,
<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>Test.i6<!>,
<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>Test().i7<!>
)
class A
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: Test.java
public class Test {
public static int i1 = 1;