mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
23 lines
327 B
Solidity
23 lines
327 B
Solidity
|
contract A {
|
||
|
function f() external virtual returns (uint256) {
|
||
|
return 1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
contract B is A {
|
||
|
function f() public override returns (uint256) {
|
||
|
return 2;
|
||
|
}
|
||
|
|
||
|
function g() public returns (uint256) {
|
||
|
return f();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// ====
|
||
|
// compileViaYul: also
|
||
|
// ----
|
||
|
// f() -> 2
|
||
|
// g() -> 2
|