Fix test data for empty LHS vs isInitialized
Ignore the "property imported from object" part on JS
This commit is contained in:
-11
@@ -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
|
||||
}
|
||||
|
||||
+16
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user