mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
14 lines
424 B
Solidity
14 lines
424 B
Solidity
// Tests that private contract function is not inherited, but that internal function does.
|
|
contract A {
|
|
function f() private pure returns (uint) { return 7; }
|
|
function g() internal pure returns (uint) { return f(); }
|
|
}
|
|
contract B is A {
|
|
function f() private pure returns (uint) { return 42; }
|
|
function test() external pure returns (uint, uint) {
|
|
return (g(), f());
|
|
}
|
|
}
|
|
// ----
|
|
// test() -> 7, 0x2a
|