Fix test data for empty LHS vs isInitialized

Ignore the "property imported from object" part on JS
This commit is contained in:
Alexander Udalov
2017-10-25 12:10:10 +02:00
parent 42945d33ee
commit e73760d4ff
7 changed files with 49 additions and 17 deletions
@@ -2,9 +2,6 @@
package test
import kotlin.reflect.KProperty
import test.Derived.p
class Foo {
lateinit var p: String
@@ -29,12 +26,6 @@ object Bar {
}
}
open class Base(val b: Boolean)
object Derived : Base(::p.isInitialized) {
lateinit var p: String
}
fun box(): String {
val foo = Foo()
if (foo.test()) return "Fail 1"
@@ -44,7 +35,5 @@ fun box(): String {
if (bar.test()) return "Fail 3"
if (!bar.test()) return "Fail 4"
if (Derived.b) return "Fail 5"
return bar.p
}
@@ -0,0 +1,16 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
package test
import test.Derived.p
open class Base(val b: Boolean)
object Derived : Base(::p.isInitialized) {
lateinit var p: String
}
fun box(): String {
return if (Derived.b) "Fail" else "OK"
}