mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: make let shift operators work with all types
This commit is contained in:
committed by
Alexander Medvednikov
parent
1b5f724df0
commit
3080959084
@@ -34,7 +34,7 @@ fn bitslot(size int) int {
|
||||
}
|
||||
|
||||
fn bitget(instance BitField, bitnr int) int {
|
||||
return (instance.field[bitslot(bitnr)] >> u32(bitnr % SLOT_SIZE)) & 1
|
||||
return (instance.field[bitslot(bitnr)] >> (bitnr % SLOT_SIZE)) & u32(1)
|
||||
}
|
||||
|
||||
fn bitset(instance mut BitField, bitnr int) {
|
||||
|
||||
Reference in New Issue
Block a user