forked from paradigmxyz/solar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: modifier definitions must have a placeholder (paradigmxyz#159)
- Loading branch information
1 parent
9ce9cda
commit dba2fed
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
contract U { | ||
modifier P() {} //~ERROR: modifier must have a `_;` placeholder statement | ||
} | ||
|
||
contract C { | ||
modifier P() { | ||
if (true) { | ||
_; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error: modifier must have a `_;` placeholder statement | ||
--> ROOT/tests/ui/resolve/modifier_without_placeholder.sol:LL:CC | ||
| | ||
LL | modifier P() {} | ||
| ^ | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
|