KT-22274 report warning on labels that can't be referenced
Labels are meaningful only if they can be referenced by 'break', 'continue', or 'return' expressions.
This commit is contained in:
+1
-1
@@ -1,3 +1,3 @@
|
||||
fun test() {
|
||||
(d@ <!DECLARATION_IN_ILLEGAL_CONTEXT!>val <!UNUSED_VARIABLE!>bar<!> = 2<!>)
|
||||
(<!REDUNDANT_LABEL_WARNING!>d@<!> <!DECLARATION_IN_ILLEGAL_CONTEXT!>val <!UNUSED_VARIABLE!>bar<!> = 2<!>)
|
||||
}
|
||||
Reference in New Issue
Block a user