FE 1.0: implement typed this label resolve warning for KT-51433
#KT-51433 Fixed
This commit is contained in:
@@ -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() {
|
||||
|
||||
+14
@@ -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
|
||||
}
|
||||
+14
@@ -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<!>
|
||||
}
|
||||
+10
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user