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
Similarly to how pointers are currently automatically dereferenced in field and method expressions, it should be also possible to perform auto-deref in operator calls.
The way this would work is: if an expression of pointer type is used as an operand in some set of binary operator expressions (e.g., a + b, where a: int and b: &int), then it is automatically wrapped in a deref expression (so the example would be the same as a + *b).
For this to work consistently, pointers must themselves not support any of the operators that support auto-deref.
The text was updated successfully, but these errors were encountered:
Similarly to how pointers are currently automatically dereferenced in field and method expressions, it should be also possible to perform auto-deref in operator calls.
The way this would work is: if an expression of pointer type is used as an operand in some set of binary operator expressions (e.g.,
a + b
, wherea: int
andb: &int
), then it is automatically wrapped in a deref expression (so the example would be the same asa + *b
).For this to work consistently, pointers must themselves not support any of the operators that support auto-deref.
The text was updated successfully, but these errors were encountered: