mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
12 lines
377 B
Solidity
12 lines
377 B
Solidity
contract A {
|
|
function foo() external virtual pure returns(uint) { return 5; }
|
|
}
|
|
contract B {
|
|
function foo() external virtual pure returns(uint) { return 5; }
|
|
}
|
|
contract X is A, B {
|
|
uint public override foo;
|
|
}
|
|
// ----
|
|
// TypeError: (162-211): Derived contract must override function "foo". Function with the same name and parameter types defined in two or more base classes.
|