Skip to content

Allow delete on user-defined value types #12273

@chriseth

Description

@chriseth

We do not allow any operator on user defined value types, but delete is special: It is implicitly used when we remove an array element and variables of user-defined value type have a default value - so

delete x; // x is of type Type

is essentially equivalent to

Type y;
x = y;

which means we already implicitly use it and it would be confusing to allow re-defining delete to something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue candidateCould be a "good first issue" but something is blocking it or it has open questions.language design :rage4:Any changes to the language, e.g. new featureslow effortThere is not much implementation work to be done. The task is very easy or tiny.low impactChanges are not very noticeable or potential benefits are limited.must haveSomething we consider an essential part of Solidity 1.0.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions