Skip to content

Automatically dereference pointers in operator expressions #18

@kodek16

Description

@kodek16

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions