solidity/test/libsolidity/syntaxTests/inheritance/override/public_vars_multiple_diamond1.sol
2019-12-09 18:41:39 +01:00

16 lines
491 B
Solidity

contract A {
function foo() external virtual pure returns(uint) { return 5; }
}
contract B is A {
uint public override foo;
}
contract C is A {
function foo() external virtual override pure returns(uint) { return 5; }
}
contract X is B, C {
uint public override foo;
}
// ----
// DeclarationError: (245-269): Identifier already declared.
// TypeError: (223-272): Derived contract must override function "foo". Two or more base classes define function with same name and parameter types.