mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Implement virtual keyword
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
abstract contract a {
|
||||
function f() public;
|
||||
function f() virtual public;
|
||||
}
|
||||
contract b is a {
|
||||
function f() public override { super.f(); }
|
||||
function f() public virtual override { super.f(); }
|
||||
}
|
||||
contract c is a,b {
|
||||
// No error here.
|
||||
function f() public override(a, b) { super.f(); }
|
||||
}
|
||||
// ----
|
||||
// TypeError: (102-109): Member "f" not found or not visible after argument-dependent lookup in contract super b.
|
||||
// TypeError: (118-125): Member "f" not found or not visible after argument-dependent lookup in contract super b.
|
||||
|
||||
Reference in New Issue
Block a user