mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Only operator defined as global is transitive through imports test case
This commit is contained in:
parent
5cf88593fd
commit
25292cd77b
@ -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
|
Loading…
Reference in New Issue
Block a user