Skip to content

support overloaded operators in lvalues #2193

@nikomatsakis

Description

@nikomatsakis

You should be able to write:

foo[x] = y

which should translate to foo.[]=(x, y) or something like that. This would be great as an alias for the insert() function on maps. I can't think of any other overloadable operators that are valid in lvalues... do we allow unary * to be overloaded?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)A-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions