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
The code below shows how to mutate variable that wasn't marked as mut. Since V is considered to be a secure language, pointer operations like below must be wrapped in unsafe block so it will be clear for end programmer what is going on
Reproduction Steps
c := 0
cref := &c
(*cref)++
println(c)
Expected Behavior
Outputs warning, outputs 1
Current Behavior
No warning, outputs 1
Possible Solution
No response
Additional Information/Context
No response
V version
0.4.2
Environment details (OS name and version, etc.)
Unrelated
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.
Describe the bug
The code below shows how to mutate variable that wasn't marked as
mut. Since V is considered to be a secure language, pointer operations like below must be wrapped inunsafeblock so it will be clear for end programmer what is going onReproduction Steps
Expected Behavior
Outputs warning, outputs 1
Current Behavior
No warning, outputs 1
Possible Solution
No response
Additional Information/Context
No response
V version
0.4.2
Environment details (OS name and version, etc.)
Unrelated
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.