Files
kotlin-fork/compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt
T
2019-03-04 13:59:58 +01:00

30 lines
520 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: A.kt
@file:[JvmName("MultifileClass") JvmMultifileClass]
package a
annotation class A
@A
const val OK: String = "OK"
// FILE: B.kt
import a.OK
fun box(): String {
val okRef = ::OK
// TODO: see KT-10892
// val annotations = okRef.annotations
// val numAnnotations = annotations.size
// if (numAnnotations != 1) {
// throw AssertionError("Failed, annotations: $annotations")
// }
val result = okRef.get()
return result
}