-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.Unit: CheckerBugs/feature requests, that are related to the type checker.Bugs/feature requests, that are related to the type checker.
Description
V version: V 0.2.2 bf623e1
OS: linux
What did you do?
enum Enum { a b }
fn test(x Enum) bool {
return .a == x
}
dump(test(.a))What did you expect to see?
[test.v:7] test(.a): true
What did you see instead?
Compile error
test.v:4:9: error: expected type is not an enum (`bool`)
2 |
3 | fn test(x Enum) bool {
4 | return .a == x
| ~~
5 | }
6 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.Unit: CheckerBugs/feature requests, that are related to the type checker.Bugs/feature requests, that are related to the type checker.