Files
kotlin-fork/compiler/testData/codegen/box/properties/lateinit/local/kt23260.kt
T

16 lines
336 B
Kotlin
Vendored

// KJS_WITH_FULL_RUNTIME
// 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}"
}
}