solidity/test/libsolidity/semanticTests/functionCall/file_level_call_via_module.sol

17 lines
377 B
Solidity
Raw Normal View History

2020-09-25 10:21:55 +00:00
==== Source: a.sol ====
function f(uint) pure returns (uint) { return 7; }
function f(bytes memory x) pure returns (uint) { return x.length; }
==== Source: b.sol ====
import "a.sol" as M;
contract C {
function f() public pure returns (uint, uint) {
return (M.f(2), M.f("abc"));
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
2020-09-25 10:21:55 +00:00
// ----
// f() -> 7, 3