Support lateinit local vars in JVM BE

This commit is contained in:
Dmitry Petrov
2017-05-31 16:03:04 +03:00
parent 53961e8df0
commit c5b9d500bc
13 changed files with 363 additions and 17 deletions
@@ -0,0 +1,17 @@
// WITH_REFLECT
import kotlin.UninitializedPropertyAccessException
fun box(): String {
lateinit var str: String
var str2: String = ""
try {
str2 = str
return "Should throw an exception"
}
catch (e: UninitializedPropertyAccessException) {
return "OK"
}
catch (e: Throwable) {
return "Unexpected exception: ${e::class.qualifiedName}"
}
}