solidity/test/libsolidity/semanticTests/using/module_renamed.sol

25 lines
430 B
Solidity
Raw Normal View History

2021-10-11 08:16:52 +00:00
==== Source: A ====
function f(uint x) pure returns (uint) {
return x + 2;
}
function g(uint x) pure returns (uint) {
return x + 8;
}
==== Source: B ====
import {f as g, g as f} from "A";
==== Source: C ====
contract C {
function test(uint x, uint y) public pure returns (uint, uint) {
return (x.f(), y.g());
}
}
using {M.g, M.f} for uint;
import "B" as M;
// ----
// test(uint256,uint256): 1, 1 -> 9, 3