Files
kotlin-fork/compiler/testData/codegen/box/compileKotlinAgainstKotlin/internalLeakBug.kt
T
2021-11-28 11:32:07 +03:00

26 lines
389 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// !LANGUAGE: +ProperInternalVisibilityCheckInImportingScope
// See also: KT-23727
// WITH_STDLIB
// MODULE: m1
// FILE: Foo.kt
package foo
internal annotation class Volatile
// MODULE: m2(m1)
// FILE: Bar.kt
import foo.*
class Bar {
@Volatile
var v = 0
}
fun box(): String {
val bar = Bar()
return if (bar.v == 0) "OK" else "FAIL: ${bar.v}"
}