mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Implement override checking
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
contract A { modifier mod(uint a) { _; } }
|
||||
contract B is A { modifier mod(uint8 a) { _; } }
|
||||
// ----
|
||||
// TypeError: (61-89): Overriding modifier is missing 'override' specifier.
|
||||
// TypeError: (61-89): Override changes modifier signature.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract A { modifier mod(uint a) { _; } }
|
||||
contract B is A { function mod(uint a) public { } }
|
||||
// ----
|
||||
// DeclarationError: (61-92): Identifier already declared.
|
||||
// TypeError: (13-40): Override changes modifier to function.
|
||||
// TypeError: (61-92): Override changes modifier to function.
|
||||
|
||||
Reference in New Issue
Block a user