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,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".
|
||||
|
||||
Reference in New Issue
Block a user