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
@@ -12,7 +12,7 @@ fun test2() {
|
||||
<!UNREACHABLE_CODE!>bar(<!>11, todo()/*comment1*/, <!UNREACHABLE_CODE!>""/*comment2*/)<!>
|
||||
}
|
||||
fun test3() {
|
||||
<!UNREACHABLE_CODE!>bar(<!>11, l@(todo()/*comment*/), <!UNREACHABLE_CODE!>"")<!>
|
||||
<!UNREACHABLE_CODE!>bar(<!>11, <!REDUNDANT_LABEL_WARNING!>l@<!>(todo()/*comment*/), <!UNREACHABLE_CODE!>"")<!>
|
||||
}
|
||||
|
||||
fun todo(): Nothing = throw Exception()
|
||||
|
||||
Reference in New Issue
Block a user