Implement virtual keyword

This commit is contained in:
Mathias Baumann
2019-11-14 11:49:39 +01:00
parent 7d4e4b6088
commit 5b8ff78176
88 changed files with 395 additions and 314 deletions
@@ -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.