Disallow functions without implementation to use modifiers. This was already the case in the experimental 0.5.0 mode.

This commit is contained in:
Christian Parpart
2018-07-23 17:29:08 +01:00
committed by Alex Beregszaszi
parent 0fcdafe2b5
commit 9f35f0b805
4 changed files with 6 additions and 11 deletions
@@ -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.
@@ -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.