solidity/test/libsolidity/semanticTests/intheritance/inherited_function_through_dispatch.sol
Kamil Śliwak 1a2e441bc5 Generate internal dispatch only for functions that might actually get called via pointers
- This also adds support for internal library calls as a side-effect since they'll now be pulled into the internal dispatch automatically.
2020-05-26 17:01:50 +02:00

22 lines
375 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();
}
}
// ====
// compileViaYul: also
// ----
// g() -> 1