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,5 +1,5 @@
contract B { function f() public view {} }
contract B { function f() virtual public view {} }
contract C is B { function f() public {} }
// ----
// TypeError: (61-83): Overriding function is missing 'override' specifier.
// TypeError: (61-83): Overriding function changes state mutability from "view" to "nonpayable".
// TypeError: (69-91): Overriding function is missing 'override' specifier.
// TypeError: (69-91): Overriding function changes state mutability from "view" to "nonpayable".