[FIR] Forbid multiple labels per statement

^KT-53629: Fixed
This commit is contained in:
vladislav.grechko
2024-01-25 17:24:27 +01:00
committed by Space Team
parent cd5b38b958
commit d27adf6677
29 changed files with 201 additions and 34 deletions
@@ -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() {}
}