mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
33 lines
1.5 KiB
Solidity
33 lines
1.5 KiB
Solidity
interface SuperA {
|
|
function test1() external returns (uint256);
|
|
function test2() external returns (uint256);
|
|
function test3() external returns (uint256);
|
|
function test4() external returns (uint256);
|
|
function test5() external returns (uint256);
|
|
}
|
|
|
|
interface SuperB {
|
|
function test1() external returns (uint256);
|
|
function test2() external returns (uint256);
|
|
function test3() external returns (uint256);
|
|
function test4() external returns (uint256);
|
|
function test5() external returns (uint256);
|
|
}
|
|
|
|
interface Sub is SuperB, SuperA {
|
|
function test1() external returns (uint256);
|
|
function test2() external override returns (uint256);
|
|
function test3() external override(SuperA) returns (uint256);
|
|
function test4() external override(SuperB) returns (uint256);
|
|
function test5() external override(SuperA, SuperB) returns (uint256);
|
|
}
|
|
|
|
// ----
|
|
// TypeError: (572-616): Overriding function is missing "override" specifier.
|
|
// TypeError: (572-616): Overriding function is missing "override" specifier.
|
|
// TypeError: (572-616): Function needs to specify overridden contracts "SuperB" and "SuperA".
|
|
// TypeError: (647-655): Function needs to specify overridden contracts "SuperB" and "SuperA".
|
|
// TypeError: (705-721): Function needs to specify overridden contract "SuperB".
|
|
// TypeError: (771-787): Function needs to specify overridden contract "SuperA".
|
|
// Warning: (837-861): Override specifier list order differs from inheritance order.
|