FE 1.0: implement typed this label resolve warning for KT-51433

#KT-51433 Fixed
This commit is contained in:
Mikhail Glukhikh
2022-02-22 12:23:20 +03:00
committed by Space
parent b5e2c492c6
commit 14eec6cfc0
9 changed files with 89 additions and 12 deletions
@@ -32,7 +32,7 @@ private typealias Extension = TypedThis
class TypedThis {
fun TypedThis.baz() {
this@TypedThis
this<!LABEL_RESOLVE_WILL_CHANGE("class TypedThis; function baz extension receiver")!>@TypedThis<!>
}
fun Extension.bar() {
@@ -0,0 +1,14 @@
// !LANGUAGE: +ContextReceivers
class Some {
context(Some, String)
fun foo() {
this<!UNRESOLVED_LABEL!>@foo<!>
this@Some
this<!UNRESOLVED_LABEL!>@String<!>
}
context(Some)
val self: Some
get() = this@Some
}
@@ -0,0 +1,14 @@
// !LANGUAGE: +ContextReceivers
class Some {
context(Some, String)
fun foo() {
<!NO_THIS!>this@foo<!>
this<!LABEL_RESOLVE_WILL_CHANGE("class Some; function foo context receiver")!>@Some<!>
this@String
}
context(Some)
val self: Some
get() = this<!LABEL_RESOLVE_WILL_CHANGE("class Some; property self context receiver")!>@Some<!>
}
@@ -0,0 +1,10 @@
package
public final class Some {
public constructor Some()
context(Some) public final val self: Some
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
context(Some, kotlin.String) public final fun foo(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}