mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Some more tests.
This commit is contained in:
parent
6d2f1f3068
commit
06e8e216b3
@ -0,0 +1,15 @@
|
||||
contract A {
|
||||
function f() external virtual {}
|
||||
}
|
||||
contract B {
|
||||
function f() external virtual {}
|
||||
}
|
||||
contract C is A, B {
|
||||
function f() external override (A, B);
|
||||
}
|
||||
contract X is C {
|
||||
}
|
||||
// ----
|
||||
// TypeError: (120-158): Overriding an implemented function with an unimplemented function is not allowed.
|
||||
// TypeError: (120-158): Overriding an implemented function with an unimplemented function is not allowed.
|
||||
// TypeError: (120-158): Functions without implementation must be marked virtual.
|
@ -0,0 +1,19 @@
|
||||
interface I {
|
||||
function f() external;
|
||||
function g() external;
|
||||
}
|
||||
interface J {
|
||||
function f() external;
|
||||
}
|
||||
abstract contract IJ is I, J {
|
||||
function f() external virtual override (I, J);
|
||||
}
|
||||
abstract contract A is IJ
|
||||
{
|
||||
function f() external virtual override;
|
||||
}
|
||||
abstract contract B is IJ
|
||||
{
|
||||
function g() external override {}
|
||||
}
|
||||
abstract contract C is A, B {}
|
Loading…
Reference in New Issue
Block a user