solidity/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls.sol
2023-05-11 10:56:55 -05:00

19 lines
303 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;
}
}
// ----
// f() -> 2