You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Odin: dev-2024-10:8006ba919
OS: Manjaro Linux, Linux 6.1.106-1-MANJARO
CPU: 12th Gen Intel(R) Core(TM) i7-1260P
RAM: 31806 MiB
Backend: LLVM 14.0.6
Expected Behavior
This should work, since the outer labels are in different scopes:
ru := 'x'
switch ru {
case ' ', '\n':
outer: for i in 0 ..= 10 {
for j in 0 ..= 10 {
if i == j {
break outer
}
}
}
case:
outer: for i in 0 ..= 10 {
for j in 0 ..= 10 {
if i == j {
break outer
}
}
}
}
Similar to how this works, declaring an s variable in different scopes is fine:
main :: proc() {
ru := 'x'
switch ru {
case ' ', '\n':
s := "Hello"
case:
s := "Hello"
}
}
Current Behavior
/home/tadeo/Desktop/test/o2/i.odin(24:3) Error: Duplicate label with the name 'outer'
outer: for i in 0 ..= 10 {
^~~~^
The text was updated successfully, but these errors were encountered:
Context
Expected Behavior
This should work, since the
outer
labels are in different scopes:Similar to how this works, declaring an
s
variable in different scopes is fine:Current Behavior
The text was updated successfully, but these errors were encountered: