Files
kotlin-fork/compiler/testData/codegen/box/properties/lateinit/exceptionField.kt
T
2015-09-05 00:54:20 +03:00

18 lines
289 B
Kotlin
Vendored

class A {
private lateinit var str: String
public fun getMyStr(): String {
try {
val a = str
} catch (e: RuntimeException) {
return "OK"
}
return "FAIL"
}
}
fun box(): String {
val a = A()
return a.getMyStr()
}