solidity/test/libsolidity/syntaxTests/operators/userDefined/calling_operator.sol

12 lines
245 B
Solidity
Raw Normal View History

2022-07-28 06:39:10 +00:00
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);
}