mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow functions without implementation to use modifiers. This was already the case in the experimental 0.5.0 mode.
This commit is contained in:
committed by
Alex Beregszaszi
parent
0fcdafe2b5
commit
9f35f0b805
@@ -3,5 +3,5 @@ contract C {
|
||||
constructor() public x;
|
||||
}
|
||||
// ----
|
||||
// Warning: (83-106): Modifiers of functions without implementation are ignored.
|
||||
// SyntaxError: (83-106): Functions without implementation cannot have modifiers.
|
||||
// DeclarationError: (104-105): Undeclared identifier.
|
||||
|
||||
+2
-2
@@ -9,5 +9,5 @@ contract C
|
||||
function bar() public only_owner;
|
||||
}
|
||||
// ----
|
||||
// Warning: (203-236): Modifiers of functions without implementation are ignored.
|
||||
// Warning: (241-274): Modifiers of functions without implementation are ignored.
|
||||
// SyntaxError: (203-236): Functions without implementation cannot have modifiers.
|
||||
// SyntaxError: (241-274): Functions without implementation cannot have modifiers.
|
||||
|
||||
Reference in New Issue
Block a user