mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update tests for interface inheritance
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
interface Parent {
|
||||
function test() external returns (uint256);
|
||||
}
|
||||
|
||||
interface SubA is Parent {}
|
||||
interface SubB is Parent {}
|
||||
|
||||
contract C is SubA, SubB {
|
||||
function test() external override returns (uint256) { return 42; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
interface Parent {
|
||||
function test() external returns (uint256);
|
||||
}
|
||||
|
||||
interface SubA is Parent {
|
||||
function test() external override returns (uint256);
|
||||
}
|
||||
|
||||
interface SubB is Parent {
|
||||
function test() external override returns (uint256);
|
||||
}
|
||||
|
||||
contract C is SubA, SubB {
|
||||
function test() external override(SubA, SubB) returns (uint256) { return 42; }
|
||||
}
|
||||
Reference in New Issue
Block a user