JS: fix super access to simple non-overridable properties

See KT-7653
This commit is contained in:
Alexey Andreev
2017-10-24 18:19:13 +03:00
parent e488cf13ad
commit e9e01b70a8
3 changed files with 55 additions and 20 deletions
@@ -0,0 +1,31 @@
// EXPECTED_REACHABLE_NODES: 1140
open class A {
val foo = "foo"
var bar = "bar"
open val boo = "A.boo"
}
class B : A() {
override val boo = "B.boo"
fun test(): String {
var r = ""
r += super.foo + ";"
r += super.bar + ";"
super.bar = "baz"
r += super.bar + ";"
r += super.boo + ";"
r += boo + ";"
return r
}
}
fun box(): String {
val r = B().test()
if (r != "foo;bar;baz;A.boo;B.boo;") return "fail: $r"
return "OK"
}