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
@@ -19,7 +19,7 @@ class TestObjectLiteral {
|
||||
val y = <!UNINITIALIZED_VARIABLE!>obj<!>
|
||||
}
|
||||
}
|
||||
val obj1: A = l@ ( object: A(<!UNINITIALIZED_VARIABLE!>obj1<!>) {
|
||||
val obj1: A = <!REDUNDANT_LABEL_WARNING!>l@<!> ( object: A(<!UNINITIALIZED_VARIABLE!>obj1<!>) {
|
||||
init {
|
||||
val x = <!UNINITIALIZED_VARIABLE!>obj1<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user