solidity/test/libsolidity/semanticTests/libraries/stub.sol

16 lines
302 B
Solidity

library L {
function f(uint256 v) external returns (uint256) { return v*v; }
}
contract C {
function g(uint256 v) external returns (uint256) {
return L.f(v);
}
}
// ====
// compileViaYul: also
// ----
// library: L
// g(uint256): 1 -> 1
// g(uint256): 2 -> 4
// g(uint256): 4 -> 16