[FE] Report ambiguity when label can refer to multiple receivers

This commit is contained in:
Anastasiya Shadrina
2021-11-07 19:31:35 +07:00
committed by TeamCityServer
parent fd7d000138
commit ac27fda965
18 changed files with 164 additions and 39 deletions
@@ -4,9 +4,8 @@ class A<T>(val a: T)
class B(val b: Any)
class C(val c: Any)
context(A<Int>, A<String>, B) var p: Int
context(A<String>, B) var p: Int
get() {
this@A.a.<!UNRESOLVED_REFERENCE!>toDouble<!>()
this@A.a.length
this@B.b
<!NO_THIS!>this<!>
@@ -19,12 +18,27 @@ context(A<Int>, A<String>, B) var p: Int
<!UNRESOLVED_REFERENCE!>field<!> = value
}
context(A<Int>, A<String>, B) var p: Int
get() {
this<!AMBIGUOUS_LABEL!>@A<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>a<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>toDouble<!>()
this<!AMBIGUOUS_LABEL!>@A<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>a<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>length<!>
this@B.b
<!NO_THIS!>this<!>
return 1
}
set(value) {
this<!AMBIGUOUS_LABEL!>@A<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>a<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>length<!>
this@B.b
<!NO_THIS!>this<!>
<!UNRESOLVED_REFERENCE!>field<!> = value
}
context(A<Int>, A<String>, B) val C.p: Int
get() {
this@A.a.length
this<!AMBIGUOUS_LABEL!>@A<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>a<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>length<!>
this@B.b
this@C.c
this@p.c
this.c
return 1
}
}