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:
@@ -22,6 +22,6 @@ inline fun inlineFunWithInvoke2(s: (p: Int) -> Unit) {
|
||||
}
|
||||
|
||||
inline fun propagation(s: (p: Int) -> Unit) {
|
||||
inlineFunWithInvoke((label@ s))
|
||||
inlineFunWithInvoke((label2@ label@ s))
|
||||
inlineFunWithInvoke((<!REDUNDANT_LABEL_WARNING!>label@<!> s))
|
||||
inlineFunWithInvoke((<!REDUNDANT_LABEL_WARNING!>label2@<!> <!REDUNDANT_LABEL_WARNING!>label@<!> s))
|
||||
}
|
||||
Reference in New Issue
Block a user