[FIR] Forbid typeRef-named labels without +ContextReceivers

^KT-63068 Fixed
This commit is contained in:
Nikolay Lunyak
2023-11-16 12:23:50 +02:00
committed by Space Team
parent e7a3cd638e
commit 427c067cd8
4 changed files with 15 additions and 13 deletions
@@ -1,12 +1,12 @@
// ISSUE: KT-63068
fun List<Int>.f() {
this@List.size
this<!UNRESOLVED_LABEL!>@List<!>.size
}
<!UNSUPPORTED_FEATURE!>context(String)<!>
fun Int.f() {
this@String.length
this@Int.toDouble()
this<!UNRESOLVED_LABEL!>@Int<!>.toDouble()
}
<!UNSUPPORTED_FEATURE!>context(String)<!>
@@ -1,28 +1,28 @@
// ISSUE: KT-63068
fun Int.f() {
this@Int
this<!UNRESOLVED_LABEL!>@Int<!>
}
var Int.p: Int
get() {
this@Int
this<!UNRESOLVED_LABEL!>@Int<!>
<!RETURN_NOT_ALLOWED!>return@p<!> 42
}
set(value) {
this@Int
this<!UNRESOLVED_LABEL!>@Int<!>
}
class X {
var Int.p: Int
get() {
this@Int
this<!UNRESOLVED_LABEL!>@Int<!>
<!RETURN_NOT_ALLOWED!>return@p<!> 42
}
set(value) {
this@Int
this<!UNRESOLVED_LABEL!>@Int<!>
}
fun Int.f() {
this@Int
this<!UNRESOLVED_LABEL!>@Int<!>
}
}