map[Enum]u32
where Enum
is an @[flag] enum Enum as u64
is not recognized as map index beyond the 32nd bit
#23630
Labels
Bug
This tag is applied to issues which reports bugs.
Enums
Bugs involving enumerations.
Maps
Bugs involving the builtin `map` type and derivatives from it like `map[string]int` etc.
Status: Confirmed
This bug has been confirmed to be valid by a contributor.
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Unit: Compiler
Bugs/feature requests, that are related to the V compiler in general.
Describe the bug
Using u64 enum flags as keys in a map only works for the first 32 bits.
Reproduction Steps
Code: https://play.vlang.io/p/c6dad391f8
Expected Behavior
All expected bits from 0..44 are set
Current Behavior
Output:
The last 32..44 entries are empty
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.9 b91bbad
Environment details (OS name and version, etc.)
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: