Files
kotlin-fork/compiler/testData/codegen/box/properties/lateinit/kt30548.kt
T
2020-12-24 19:35:36 +03:00

21 lines
397 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
// IGNORE_BACKEND: JVM
class Test {
companion object {
private lateinit var INSTANCE: String
fun foo() {
INSTANCE
}
}
}
fun box(): String {
try {
Test.foo()
return "'Test.foo()' should throw"
} catch (e: Exception) {
return "OK"
}
}