mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
15 lines
288 B
Solidity
15 lines
288 B
Solidity
library L {
|
|
function f(uint256 v) internal returns (uint256) { return v*v; }
|
|
}
|
|
contract C {
|
|
function g(uint256 v) external returns (uint256) {
|
|
return L.f(v);
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// g(uint256): 1 -> 1
|
|
// g(uint256): 2 -> 4
|
|
// g(uint256): 4 -> 16
|