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
OS: Windows 10 Unknown Edition (00000064) (version: 22H2), build 19045.4780
CPU: 12th Gen Intel(R) Core(TM) i5-12500H
RAM: 16088 MiB
Backend: LLVM 18.1.8
Whenever a declaration is a sole statement inside a statement scope, the compiler displays an error about declaration not being used. This error, however is not displayed for switch statements.
Repro
Typecheck the following code:
package bug
main :: proc() {
switch {
case 1==1: a := 3 // Compiler doesn't complain
}
}
$ odin check examples/bug
The compiler finishes without any errors, one error expected.
The text was updated successfully, but these errors were encountered:
Context
Whenever a declaration is a sole statement inside a statement scope, the compiler displays an error about declaration not being used. This error, however is not displayed for switch statements.
Repro
Typecheck the following code:
The compiler finishes without any errors, one error expected.
The text was updated successfully, but these errors were encountered: