[FIR] Allow to evaluate top level const properties in Java world

#KT-57802
This commit is contained in:
Ivan Kylchik
2023-10-20 16:33:20 +00:00
committed by Space Team
parent 886ef1a4b4
commit 7935b2bdb1
11 changed files with 194 additions and 29 deletions
@@ -0,0 +1,18 @@
// TARGET_BACKEND: JVM
// FILE: Bar.java
package one.two;
public class Bar {
public static final int BAR = MainKt.FOO + 1;
}
// FILE: Main.kt
package one.two
const val FOO = <!EVALUATED("1")!>1<!>
const val BAZ = <!EVALUATED("3")!>Bar.BAR + 1<!>
fun box(): String {
return "OK"
}