[FIR] Add NO_THIS & INSTANCE_ACCESS_BEFORE_SUPER_CALL

This commit is contained in:
Nick
2020-08-17 17:21:46 +03:00
parent 7e1c2cfd36
commit c8f8908a01
86 changed files with 526 additions and 219 deletions
@@ -2,7 +2,7 @@
class A() {
fun foo() : Unit {
this@A
this@a
<!UNRESOLVED_LABEL!>this@a<!>
this
}
@@ -11,7 +11,7 @@ class A(val a:Int) {
checkSubtype<A>(this@A)
}
val b: Double.() -> Unit = a@{ checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx) }
val c = a@{ -> this@a + checkSubtype<Byte>(this@xx) }
val c = a@{ -> <!UNRESOLVED_LABEL!>this@a<!> + checkSubtype<Byte>(this@xx) }
return (a@{checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx)})
}
}
@@ -3,6 +3,6 @@ interface Base {
}
val String.test: Base = object: Base {
override fun foo() {
this@test
<!UNRESOLVED_LABEL!>this@test<!>
}
}
@@ -1,4 +1,4 @@
fun foo1() : Unit {
this
this@a
<!NO_THIS!>this<!>
<!UNRESOLVED_LABEL!>this@a<!>
}