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
when taking a pointer to an element of a mutable array, adding extra parenthesis sidesteps safety check
Reproduction Steps
mutarr:= [1, 2, 3]
mutptr1:=&(arr[1]) // <- this should error, but it doesn'tmutptr2:=&arr[1] // <- this errors, unless put inside unsafe block
Expected Behavior
the checker should catch this
Current Behavior
the checker ignores it
Possible Solution
No response
Additional Information/Context
there's already a check in place for the exact situation, but it is sidestepped with added parenthesis. my attempts at dump debugging show that in this case typ_sym is treated like an immutable value rather than a mutable array
Describe the bug
when taking a pointer to an element of a mutable array, adding extra parenthesis sidesteps safety check
Reproduction Steps
Expected Behavior
the checker should catch this
Current Behavior
the checker ignores it
Possible Solution
No response
Additional Information/Context
there's already a check in place for the exact situation, but it is sidestepped with added parenthesis. my attempts at dump debugging show that in this case
typ_symis treated like an immutable value rather than a mutable arrayV version
V 0.4.10 52c7130
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.