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:
@@ -59,7 +59,7 @@ fun main1() {
|
||||
{1}();
|
||||
(fun (x : Int) = x)(1)
|
||||
1.(fun Int.(x : Int) = x)(1);
|
||||
l@{1}()
|
||||
<!OI;REDUNDANT_LABEL_WARNING!>l@<!>{1}()
|
||||
1.((fun Int.() = 1))()
|
||||
1.(f())()
|
||||
1.if(true){f()}else{f()}()
|
||||
|
||||
Reference in New Issue
Block a user