Files
kotlin-fork/compiler/testData/codegen/box/involvesIrInterpreter/constEvaluationFromJavaWorld/accessTopLevelConstWithCustomFileName.kt
T
Ivan Kylchik 4334ae9da9 [FIR] Add JvmName to the list of REQUIRED_ANNOTATIONS
We need to resolve `JvmName` as soon as possible because
it can be analyzed in `FirJavaElementFinder` to create
the correct class stub.

#KT-57802
2023-10-20 16:33:20 +00:00

29 lines
584 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// WITH_STDLIB
// FILE: Bar.java
package one.two;
public class Bar {
public static final int BAR = OtherKt.FOO + 1;
public Child getChild() {
return new Child();
}
}
// FILE: Main.kt
@file:JvmName(<!EVALUATED("OtherKt")!>"OtherKt"<!>)
package one.two
const val FOO = <!EVALUATED("1")!>1<!>
const val BAZ = <!EVALUATED("3")!>Bar.BAR + 1<!>
// This class is presented here to check that on super type resolve phase we have resolved `JvmName` annotation
class Child : Bar()
fun box(): String {
return "OK"
}