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
@@ -10,13 +10,13 @@ class Foo {
inner class Bar {
fun good() {
contract {
<!ERROR_IN_CONTRACT_DESCRIPTION!>returns() implies (<!UNRESOLVED_LABEL!>this@Bar<!> != null)<!>
<!ERROR_IN_CONTRACT_DESCRIPTION!>returns() implies (this<!UNRESOLVED_LABEL!>@Bar<!> != null)<!>
}
}
fun badOuter() {
contract {
<!ERROR_IN_CONTRACT_DESCRIPTION!>returns() implies (<!UNRESOLVED_LABEL!>this@Foo<!> != null)<!>
<!ERROR_IN_CONTRACT_DESCRIPTION!>returns() implies (this<!UNRESOLVED_LABEL!>@Foo<!> != null)<!>
}
}
@@ -34,7 +34,7 @@ class Foo {
fun A?.badWithReceiver() {
contract {
<!ERROR_IN_CONTRACT_DESCRIPTION!>returns() implies (<!UNRESOLVED_LABEL!>this@Bar<!> != null)<!>
<!ERROR_IN_CONTRACT_DESCRIPTION!>returns() implies (this<!UNRESOLVED_LABEL!>@Bar<!> != null)<!>
}
}
}