Update multiple_custom_operators_same_contract

This commit is contained in:
wechman 2022-07-08 09:31:53 +02:00
parent cf82accb14
commit dd251379e7

View File

@ -1,16 +1,18 @@
// TODO: Isn't it suppose to be the exact same as all_operators.sol ?
type MyInt is int;
using {add as +} for MyInt;
function add(MyInt, MyInt) pure returns (bool) {
return true;
function add(MyInt, MyInt) pure returns (MyInt) {
return MyInt.wrap(0);
}
contract C {
function f() public pure returns (bool t) {
function f() public pure returns (MyInt t) {
t = MyInt.wrap(2) + MyInt.wrap(7);
}
}
// ====
// compileViaYul: also
// ----
// f() -> true
// f() -> 0