Disallow overriding operators for enums

This commit is contained in:
wechman
2022-09-28 12:10:27 +02:00
parent 275a43068c
commit beae1e6263
2 changed files with 21 additions and 1 deletions
@@ -0,0 +1,13 @@
using {add as +} for E;
enum E {
E1,
E2
}
function add(E, E) pure returns (E) {
return E.E1;
}
// ----
// TypeError 9921: (0-23): The "using" directive cannot be used to attach functions to the enum type.