mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
1a2e441bc5
- This also adds support for internal library calls as a side-effect since they'll now be pulled into the internal dispatch automatically.
27 lines
467 B
Solidity
27 lines
467 B
Solidity
contract Base {
|
|
function f() internal returns (uint256 i) {
|
|
function() internal returns (uint256) ptr = g;
|
|
return ptr();
|
|
}
|
|
|
|
function g() internal virtual returns (uint256 i) {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
contract Derived is Base {
|
|
function g() internal override returns (uint256 i) {
|
|
return 2;
|
|
}
|
|
|
|
function h() public returns (uint256 i) {
|
|
return f();
|
|
}
|
|
}
|
|
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// h() -> 2
|