Files
kotlin-fork/compiler/testData/diagnostics/tests/modifiers/const/kotlinJavaCycle.kt
T
Ivan Kylchik 79c300209e [K2] Avoid type check for Kotlin's property in ConstUtils
When we check Java field for constant initializer, we could
be asked to get and check the type of Kotlin's property that
is used in this Java field. But there is no guarantee that the type
resolve phase was finished and this type is available. So we just
check for `const` modifier and skip type check.

#KT-63752 Fixed
#KT-62558 Obsolete
#KT-61786 Declined
2023-12-12 13:54:32 +00:00

21 lines
282 B
Kotlin
Vendored

// FIR_IDENTICAL
// FILE: Bar.java
public class Bar {
public static final int BAR = Foo.FOO + 1;
}
// FILE: Test.kt
class Foo {
companion object {
const val FOO = Baz.BAZ + 1
}
}
class Baz {
companion object {
const val BAZ = Bar.BAR + 1
}
}