User-defined operators: Tests

This commit is contained in:
wechman
2023-01-25 00:29:10 +01:00
committed by Kamil Śliwak
parent fd6359000e
commit 1edb74dbc9
85 changed files with 2138 additions and 1 deletions
@@ -0,0 +1,10 @@
type Type is uint;
using {f as +} for Type;
function f(Type, Type) pure returns (Type) {}
Type constant t = Type.wrap(1);
Type constant u = v + t;
Type constant v = u + t;
// ----
// TypeError 8349: (141-146): Initial value for constant variable has to be compile-time constant.
// TypeError 8349: (166-171): Initial value for constant variable has to be compile-time constant.