[FIR] Forbid multiple labels per statement
^KT-53629: Fixed
This commit is contained in:
committed by
Space Team
parent
cd5b38b958
commit
d27adf6677
@@ -0,0 +1,37 @@
|
||||
// !DIAGNOSTICS: -REDUNDANT_LABEL_WARNING
|
||||
|
||||
fun foo1() {
|
||||
l2@ l1@ do {
|
||||
} while (true)
|
||||
}
|
||||
|
||||
fun foo2() {
|
||||
l4@ <!UNDERSCORE_IS_RESERVED!>_<!>@ l3@ <!UNDERSCORE_IS_RESERVED!>__<!>@ l2@ l1@ while (true) {
|
||||
}
|
||||
}
|
||||
|
||||
fun foo3() {
|
||||
l2@ l1@ 42
|
||||
}
|
||||
|
||||
fun foo4() {
|
||||
l1@ do {
|
||||
l4@ { false }
|
||||
} while (true)
|
||||
}
|
||||
|
||||
fun foo5() {
|
||||
l2@ l1@ do {
|
||||
l4@ { false }
|
||||
} while (true)
|
||||
}
|
||||
|
||||
fun foo6() {
|
||||
l2@ l1@ do {
|
||||
l4@ l3@{ true }
|
||||
} while (true)
|
||||
}
|
||||
|
||||
fun foo7() {
|
||||
l3@ l2@ l1@ fun bar() {}
|
||||
}
|
||||
Reference in New Issue
Block a user