fa1f7d988e
Merge tests in boxMultifileClasses/calls to one test case; copy the two resulting tests (+ change box to main) to compileKotlinAgainstKotlin
28 lines
527 B
Kotlin
Vendored
28 lines
527 B
Kotlin
Vendored
// 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 main(args: Array<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()
|
|
if (result != "OK") throw AssertionError("Fail: $result")
|
|
}
|