solidity/test/libsolidity/syntaxTests/inheritance/override/public_vars_multiple3.sol
2022-04-01 23:41:18 -05:00

11 lines
372 B
Solidity

contract A {
function foo() external virtual view returns(A) { }
function foo(uint ) external virtual view returns(uint) { return 4; }
function foo(uint , uint ) external view virtual returns(A) { }
}
contract X is A {
uint public override foo;
}
// ----
// TypeError 4822: (225-249='uint public override foo'): Overriding public state variable return types differ.