V version:
Latest snapshot (d117c0a7429223441b5bb184a183ea14b090cf79)
OS:
Android/Termux
What did you do?
Tried to compile a program. Minimal example is:
fn test_bitwise() {
mut var := [0; 1]
mask := 1
var[0] |= mask
assert var[0] == 1
}
What did you expect to see?
A successfull compilation
What did you see instead?
````
WARNING: linker: ./v: .vlang//bitwise_test.c:3110:14: error: expected expression
int tmp4 = |= mask;
^
1 error generated.
V panic: clang error
Update: I get the same error even with plain variables, not just array elements. Apparently, all bitwise operations are broken.
Update 2: Further research showed that all assignment operations beyond simple "=" are broken. "+=", "|=" etc. will not compile. Of course, this error can still be circumvented by using "var = var | value".
@pzb568 The problem is not in Termux. I can build V. I can not use "|=", "^=", "+=" etc in my programs, regardless of architecture.
@ciubotaru This seems to be working at the moment, at least in Linux.
Indeed, it was fixed.