solidity
solidity copied to clipboard
Allow delete on user-defined value types
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.