mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
21 lines
400 B
Solidity
21 lines
400 B
Solidity
contract test {
|
|
function f(uint256 a, uint256 b) public returns (uint256 d) {
|
|
return a + b;
|
|
}
|
|
|
|
function f(uint256 k) public returns (uint256 d) {
|
|
return k;
|
|
}
|
|
|
|
function g(bool flag) public returns (uint256 d) {
|
|
if (flag) return f(3);
|
|
else return f(3, 7);
|
|
}
|
|
}
|
|
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// g(bool): true -> 3
|
|
// g(bool): false -> 10
|