FIR checker: fix position strategy for UNRESOLVED_LABEL

This commit is contained in:
Tianyu Geng
2021-06-25 13:16:58 -07:00
committed by Ivan Kochurkin
parent 45d31fdba2
commit bcf6202863
24 changed files with 58 additions and 35 deletions
@@ -2,11 +2,11 @@
class A() {
fun foo() : Unit {
this@A
<!UNRESOLVED_LABEL!>this@a<!>
this<!UNRESOLVED_LABEL!>@a<!>
this
}
val x = this@A.foo()
val y = this.foo()
val z = foo()
}
}
@@ -11,8 +11,8 @@ 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@{ -> <!UNRESOLVED_LABEL!>this@a<!> + checkSubtype<Byte>(this@xx) }
val c = a@{ -> this<!UNRESOLVED_LABEL!>@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 = <!EXTENSION_PROPERTY_WITH_BACKING_FIELD!>object<!>: Base {
override fun foo() {
<!UNRESOLVED_LABEL!>this@test<!>
this<!UNRESOLVED_LABEL!>@test<!>
}
}
}
@@ -1,4 +1,4 @@
fun foo1() : Unit {
<!NO_THIS!>this<!>
<!UNRESOLVED_LABEL!>this@a<!>
}
this<!UNRESOLVED_LABEL!>@a<!>
}