solidity/test/libsolidity/syntaxTests/operators/userDefined/calling_operator.sol
2023-02-22 00:40:03 +01:00

12 lines
245 B
Solidity

type Int is int;
using {add as +} for Int global;
using {unsub as -} for Int global;
function add(Int, Int) pure returns (Int) {}
function unsub(Int) pure returns (Int) {}
function f() pure {
Int.wrap(0) + Int.wrap(0);
-Int.wrap(0);
}