solidity/test/libsolidity/semanticTests/inheritance/inherited_function_through_dispatch.sol
2022-05-19 20:23:28 +02:00

22 lines
376 B
Solidity

contract A {
function f() internal virtual returns (uint256) {
return 1;
}
}
contract B is A {
function f() internal override returns (uint256) {
return 2;
}
function g() public returns (uint256) {
function() internal returns (uint256) ptr = A.f;
return ptr();
}
}
// ====
// compileToEwasm: also
// ----
// g() -> 1