[FIR] Support the simple case of java field interpretation

#KT-57802
This commit is contained in:
Ivan Kylchik
2023-09-04 16:18:27 +02:00
committed by Space Team
parent 2af73c2b13
commit 886ef1a4b4
11 changed files with 148 additions and 6 deletions
@@ -0,0 +1,39 @@
// TARGET_BACKEND: JVM
// FILE: Bar.java
package one.two;
public class Bar {
public static final int BAR = Doo.DOO + 1;
}
// FILE: Boo.java
package one.two;
public class Boo {
public static final int BOO = Baz.BAZ + 1;
}
// FILE: Main.kt
package one.two
class Foo {
companion object {
const val FOO = <!EVALUATED("5")!>Boo.BOO + 1<!>
}
}
class Baz {
companion object {
const val BAZ = <!EVALUATED("3")!>Bar.BAR + 1<!>
}
}
class Doo {
companion object {
const val DOO = <!EVALUATED("1")!>1<!>
}
}
fun box(): String {
return "OK"
}