Only operator defined as global is transitive through imports test case

This commit is contained in:
wechman 2022-09-27 10:13:02 +02:00
parent 5cf88593fd
commit 25292cd77b

View File

@ -0,0 +1,26 @@
==== Source: s1.sol ====
type Int is int;
using {add1 as +} for Int global;
function add1(Int, Int) pure returns (Int) {
return Int.wrap(3);
}
==== Source: s2.sol ====
import "s1.sol";
using {add2 as +} for Int;
function add2(Int, Int) pure returns (Int) {
return Int.wrap(7);
}
==== Source: s3.sol ====
import "s2.sol";
contract C {
function f() pure public returns (Int) {
return Int.wrap(0) + Int.wrap(0);
}
}
// ----
// f() -> 3