solidity/test/libsolidity/syntaxTests/inheritance/overloaded_private_function.sol
Enrique Jorge 1276c43ad8 Fix inheritedFunctions returns private functions
OverrideChecker treated private functions as inheritable. Hence, a child
contract function could not be assigned the function name of a parent
contract private function.
2022-08-16 16:19:32 +01:00

13 lines
423 B
Solidity

contract A {
function foo() private {}
function foo(uint128 value) private {}
function foo(uint256 value) public {}
}
contract B is A {
function foo(uint128 value) private {}
function foo(uint256 value) public {}
}
// ----
TypeError 9456: (195-232): Overriding function is missing "override" specifier.
TypeError 4334: (90-127): Trying to override non-virtual function. Did you forget to add "virtual"?