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
@@ -17,7 +17,7 @@ fun test() : Unit {
|
||||
|
||||
val <!UNUSED_VARIABLE!>s<!> = "" as Any
|
||||
("" as String?)?.length
|
||||
(data@("" as String?))?.length
|
||||
(<!REDUNDANT_LABEL_WARNING!>data@<!>("" as String?))?.length
|
||||
(<!WRONG_ANNOTATION_TARGET!>@MustBeDocumented()<!>( "" as String?))?.length
|
||||
Unit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user