We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I use an alias to an enum with the @[flag] attribute, I cannot use bitfield operations on the alias.
I'm not sure whether this is supposed to work, but I assumed and couldn't find documentation denying or confirming it.
fn main() { enum_container := EnumContainer{ et: .a | .b // works } alias_container := AliasContainer{ at: .a | .b // fails } } @[flag] enum EnumType { a b c } struct EnumContainer { et EnumType } type AliasType = EnumType struct AliasContainer { at AliasType }
The aliased type should behave like the type it aliases. So the bitfield operations should work in both cases.
Compilation fails with
flag-test.v:8:7: error: undefined operation AliasType | AliasType 6 | 7 | alias_container := AliasContainer{ 8 | at: .a | .b | ~~~~~~~ 9 | } 10 | }
AliasType
No response
0.4.5
V full version: V 0.4.5 c0afe5d.f33b712 OS: linux, Ubuntu 22.04.4 LTS
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered:
This should work
Sorry, something went wrong.
Delta456
Successfully merging a pull request may close this issue.
Describe the bug
When I use an alias to an enum with the @[flag] attribute, I cannot use bitfield operations on the alias.
I'm not sure whether this is supposed to work, but I assumed and couldn't find documentation denying or confirming it.
Reproduction Steps
Expected Behavior
The aliased type should behave like the type it aliases.
So the bitfield operations should work in both cases.
Current Behavior
Compilation fails with
Possible Solution
No response
Additional Information/Context
No response
V version
0.4.5
Environment details (OS name and version, etc.)
V full version: V 0.4.5 c0afe5d.f33b712
OS: linux, Ubuntu 22.04.4 LTS
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: