-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: validate placeholder is within modifier (#132)
* fix: validate placeholder is within modifier * clippy
- Loading branch information
1 parent
c3b47d5
commit 5ade828
Showing
3 changed files
with
44 additions
and
1 deletion.
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,8 @@ | ||
contract test { | ||
modifier e() { | ||
_; | ||
} | ||
function f() external { | ||
_; //~ ERROR: placeholder statements can only be used in modifiers | ||
} | ||
} |
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: placeholder statements can only be used in modifiers | ||
--> ROOT/tests/ui/typeck/invalid_placeholder.sol:LL:CC | ||
| | ||
LL | _; | ||
| ^^ | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
|