Files
kotlin-fork/compiler/testData/codegen/box/properties/lateinit/accessorException.kt
T
2018-06-09 19:15:38 +03:00

22 lines
356 B
Kotlin
Vendored

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