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-08-nightly:8359995
OS: CachyOS, Linux 6.10.6-2-cachyos
CPU: Quad-Core Processor (up to 1.4GHz)
RAM: 3354 MiB
Backend: LLVM 18.1.8
Expected Behavior
r:='a'switchr {
caser>'0':
}
Should throw a mismatched-types compile error, since we are comparing rune to bool
Current Behavior
r > '0' is converted to true/1/'0x01' and then compared against 'a'.
Failure Information (for bugs)
switch"12" { case [2] int { 50, 51 }: } // causes an inconvertable type error.switch1 { case [2] int { 50, 51 }: } // compiles and runs (but may be because of array-programming)switchtrue { case1: } // similar error to previous
The text was updated successfully, but these errors were encountered:
Context
Expected Behavior
Should throw a mismatched-types compile error, since we are comparing
rune
tobool
Current Behavior
r > '0'
is converted totrue
/1
/'0x01'
and then compared against'a'
.Failure Information (for bugs)
The text was updated successfully, but these errors were encountered: