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
When defining an alias type for bool it cannot be used within if statements. I have no idea of language design and I'm totally fine with this issue being closed when it does not make sense. Just wanted to report in case it is not expected 😉
Expected Behavior
The mentioned code listing should (probably) compile.
Current Behavior
$ v example.vexample.v:8:5: error: non-bool type `BOOL` used as if condition 6 | 7 | fn main() { 8 | if example() { | ~~~~~~~~~ 9 | println('Should work, or not?') 10 | }
Describe the bug
When defining an alias type for
bool
it cannot be used withinif
statements. I have no idea of language design and I'm totally fine with this issue being closed when it does not make sense. Just wanted to report in case it is not expected 😉Expected Behavior
The mentioned code listing should (probably) compile.
Current Behavior
Reproduction Steps
Possible Solution
I think it would be nice to allow aliases for
bool
. Sometimes that can be more descriptive.Additional Information/Context
No response
V version
V full version: V 0.3.3 d60ceb4
Environment details (OS name and version, etc.)
OS: linux, "Manjaro Linux" (VM)
The text was updated successfully, but these errors were encountered: