Minor, add test for obsolete issue

#KT-21692 Obsolete
This commit is contained in:
Alexander Udalov
2018-11-15 20:29:34 +01:00
parent 2ff87ab1ce
commit 1a2579d8e8
6 changed files with 43 additions and 0 deletions
@@ -0,0 +1,18 @@
// WITH_RUNTIME
class Foo {
private lateinit var foo: String
fun test(): Boolean {
val result = { ::foo.isInitialized }()
foo = ""
return result
}
}
fun box(): String {
val f = Foo()
if (f.test()) return "Fail 1"
if (!f.test()) return "Fail 2"
return "OK"
}