mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
22 lines
336 B
Solidity
22 lines
336 B
Solidity
contract Base {
|
|
function f() public returns (uint256 i) {
|
|
return g();
|
|
}
|
|
|
|
function g() internal virtual returns (uint256 i) {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
contract Derived is Base {
|
|
function g() internal override returns (uint256 i) {
|
|
return 2;
|
|
}
|
|
}
|
|
|
|
// ====
|
|
// compileToEwasm: also
|
|
// ----
|
|
// f() -> 2
|