Minor: add diag.txt file for label clashes diagnostic tests
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
/labelClashes.kt:5:13: warning: this label is now resolved to 'function with' but soon it will be resolved to the closest 'anonymous function'. Please consider introducing or changing explicit label name
|
||||||
|
this@with.inc()
|
||||||
|
^
|
||||||
|
/labelClashes.kt:11:13: warning: this label is now resolved to 'function bar' but soon it will be resolved to the closest 'anonymous function'. Please consider introducing or changing explicit label name
|
||||||
|
this@bar.inc()
|
||||||
|
^
|
||||||
|
/labelClashes.kt:15:9: warning: parameter 'f' is never used
|
||||||
|
fun foo(f: with.() -> Unit) {}
|
||||||
|
^
|
||||||
|
/labelClashes.kt:20:17: warning: this label is now resolved to 'class with' but soon it will be resolved to the closest 'anonymous function'. Please consider introducing or changing explicit label name
|
||||||
|
this@with.foo()
|
||||||
|
^
|
||||||
|
/labelClashes.kt:24:17: warning: this label is now resolved to 'class with' but soon it will be resolved to the closest 'anonymous function'. Please consider introducing or changing explicit label name
|
||||||
|
this@with.foo()
|
||||||
|
^
|
||||||
|
/labelClashes.kt:37:9: warning: the expression is unused
|
||||||
|
this@TypedThis
|
||||||
|
^
|
||||||
|
/labelClashes.kt:37:13: warning: this label is now resolved to 'class TypedThis' but soon it will be resolved to the closest 'function baz extension receiver'. Please consider introducing or changing explicit label name
|
||||||
|
this@TypedThis
|
||||||
|
^
|
||||||
|
/labelClashes.kt:41:9: warning: the expression is unused
|
||||||
|
this@TypedThis
|
||||||
|
^
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||||
|
|
||||||
fun Int.with() {
|
fun Int.with() {
|
||||||
with("") {
|
with("") {
|
||||||
<!ARGUMENT_TYPE_MISMATCH!>this@with.<!UNRESOLVED_REFERENCE!>inc<!>()<!>
|
<!ARGUMENT_TYPE_MISMATCH!>this@with.<!UNRESOLVED_REFERENCE!>inc<!>()<!>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||||
|
|
||||||
fun Int.with() {
|
fun Int.with() {
|
||||||
with("") {
|
with("") {
|
||||||
this<!LABEL_RESOLVE_WILL_CHANGE("function with; anonymous function")!>@with<!>.inc()
|
this<!LABEL_RESOLVE_WILL_CHANGE("function with; anonymous function")!>@with<!>.inc()
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
/labelClashesWithContextReceivers.kt:8:9: warning: the expression is unused
|
||||||
|
this@Some
|
||||||
|
^
|
||||||
|
/labelClashesWithContextReceivers.kt:8:13: warning: this label is now resolved to 'class Some' but soon it will be resolved to the closest 'function foo context receiver'. Please consider introducing or changing explicit label name
|
||||||
|
this@Some
|
||||||
|
^
|
||||||
|
/labelClashesWithContextReceivers.kt:9:9: warning: the expression is unused
|
||||||
|
this@String
|
||||||
|
^
|
||||||
|
/labelClashesWithContextReceivers.kt:14:21: warning: this label is now resolved to 'class Some' but soon it will be resolved to the closest 'property self context receiver'. Please consider introducing or changing explicit label name
|
||||||
|
get() = this@Some
|
||||||
|
^
|
||||||
|
|
||||||
+2
-1
@@ -1,9 +1,10 @@
|
|||||||
// !LANGUAGE: +ContextReceivers
|
// !LANGUAGE: +ContextReceivers
|
||||||
|
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||||
|
|
||||||
class Some {
|
class Some {
|
||||||
context(Some, String)
|
context(Some, String)
|
||||||
fun foo() {
|
fun foo() {
|
||||||
this<!UNRESOLVED_LABEL!>@foo<!>
|
//this@foo
|
||||||
this@Some
|
this@Some
|
||||||
this<!UNRESOLVED_LABEL!>@String<!>
|
this<!UNRESOLVED_LABEL!>@String<!>
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1,9 +1,10 @@
|
|||||||
// !LANGUAGE: +ContextReceivers
|
// !LANGUAGE: +ContextReceivers
|
||||||
|
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||||
|
|
||||||
class Some {
|
class Some {
|
||||||
context(Some, String)
|
context(Some, String)
|
||||||
fun foo() {
|
fun foo() {
|
||||||
<!NO_THIS!>this@foo<!>
|
//this@foo
|
||||||
this<!LABEL_RESOLVE_WILL_CHANGE("class Some; function foo context receiver")!>@Some<!>
|
this<!LABEL_RESOLVE_WILL_CHANGE("class Some; function foo context receiver")!>@Some<!>
|
||||||
this@String
|
this@String
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user