Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically dereference pointers in operator expressions #18

Open
kodek16 opened this issue May 15, 2020 · 0 comments
Open

Automatically dereference pointers in operator expressions #18

kodek16 opened this issue May 15, 2020 · 0 comments

Comments

@kodek16
Copy link
Owner

kodek16 commented May 15, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant