Minor, add box test for unreachable uninitialized property

#KT-44496
This commit is contained in:
Alexander Udalov
2021-03-08 20:40:04 +01:00
parent 247efb220c
commit 5fc9f3bc17
9 changed files with 64 additions and 0 deletions
@@ -0,0 +1,21 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: EXCEPTIONS_NOT_IMPLEMENTED
// WITH_RUNTIME
// KT-44496
class C {
val todo: String = TODO()
val uninitializedVal: String
var uninitializedVar: String
}
fun box(): String =
try {
C()
"Fail"
} catch (e: NotImplementedError) {
"OK"
}