Files
kotlin-fork/compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt
T
2016-11-09 21:41:12 +03:00

16 lines
286 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
class A {
public lateinit var str: String
}
fun box(): String {
val a = A()
try {
a.str
} catch (e: RuntimeException) {
return "OK"
}
return "FAIL"
}