You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tcc version 0.9.28rc 2024-07-31 HEAD@1cee0908 (x86_64 Linux)
tcc git status
thirdparty-linux-amd64 0134e9b9
emcc version
N/A
glibc version
ldd (GNU libc) 2.39
What did you do? ./v -g -o vdbg cmd/v && ./vdbg bug.v && bug
muts:="Hello"mutp:=&s
p += s
What did you see?
bug.v:3:3: warning: pointer arithmetic is only allowed in `unsafe` blocks
1 | mut s := "Hello"
2 | mut p := &s
3 | p += s
| ~~
bug.v:2:5: warning: unused variable: `p`
1 | mut s := "Hello"
2 | mut p := &s
| ^
3 | p += s
bug.v:3:3: error: mismatched types `&string` and `string`
1 | mut s := "Hello"
2 | mut p := &s
3 | p += s
| ~~
bug.v:3:1: error: operator `+=` not defined on left operand type `string`
1 | mut s := "Hello"
2 | mut p := &s
3 | p += s
| ^
What did you expect to see?
To say it is not defined on &string (because it is defined for string). But I dont know if it should allow for &string += string .
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.
V version: V 0.4.9 a20fff9, press to see full `v doctor` output
What did you do?
./v -g -o vdbg cmd/v && ./vdbg bug.v && bugWhat did you see?
What did you expect to see?
To say it is not defined on &string (because it is defined for string). But I dont know if it should allow for &string += string .
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.