Files
kotlin-fork/compiler/testData/codegen/box/properties/lateinit/local/kt23260.kt
T
2021-11-15 19:53:46 +03:00

15 lines
311 B
Kotlin
Vendored

// WITH_RUNTIME
fun box(): String {
lateinit var str: String
try {
println(str)
return "Should throw an exception"
}
catch (e: UninitializedPropertyAccessException) {
return "OK"
}
catch (e: Throwable) {
return "Unexpected exception: ${e::class}"
}
}