15 lines
302 B
Kotlin
Vendored
15 lines
302 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
import kotlin.UninitializedPropertyAccessException
|
|
|
|
fun box(): String {
|
|
val o = object {
|
|
lateinit var x: Any
|
|
}
|
|
try {
|
|
if (o.x == null) return "fail 1"
|
|
return "fail 2"
|
|
} catch (t: UninitializedPropertyAccessException) {
|
|
return "OK"
|
|
}
|
|
} |