solidity/test/libsolidity/semanticTests/virtualFunctions/virtual_override_changing_mutability_internal.sol

24 lines
620 B
Solidity

contract A {
function f() internal virtual {
mutableWithViewOverride();
mutableWithPureOverride();
viewWithPureOverride();
}
function mutableWithViewOverride() internal virtual {}
function mutableWithPureOverride() internal virtual {}
function viewWithPureOverride() internal view virtual {}
}
contract C is A {
function run() public {
f();
}
function mutableWithViewOverride() internal view override {}
function mutableWithPureOverride() internal pure override {}
function viewWithPureOverride() internal pure override {}
}
// ----
// run() ->