8dee36d420
Prefer to have all module dependencies, including dependencies on stdlib/reflect, declared explicitly. This allows to have tests on situations like the one in KT-45308: three modules A<-B<-C, where C doesn't depend on A, which was compiling correctly with the old JVM backend before 1.5, but started to fail with JVM IR in 1.5. Also simplify the code a bit, remove duplicated logic.
25 lines
457 B
Kotlin
Vendored
25 lines
457 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// MODULE: lib
|
|
// WITH_RUNTIME
|
|
// FILE: A.kt
|
|
|
|
package first.second
|
|
|
|
class FqName(val s: String)
|
|
|
|
@JvmField
|
|
val VOLATILE_ANNOTATION_FQ_NAME = FqName("volatile")
|
|
|
|
// MODULE: main(lib)
|
|
// WITH_RUNTIME
|
|
// FILE: B.kt
|
|
|
|
import first.second.VOLATILE_ANNOTATION_FQ_NAME
|
|
import first.second.FqName
|
|
|
|
fun foo() = hasAnnotation(VOLATILE_ANNOTATION_FQ_NAME)
|
|
|
|
fun hasAnnotation(name: FqName): Boolean = true
|
|
|
|
fun box() = if (foo()) "OK" else "FAIL"
|