-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(parser): recover old-style fallbacks (#135)
- Loading branch information
Showing
4 changed files
with
57 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
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 @@ | ||
// https://github.com/foundry-rs/foundry/issues/9349 | ||
|
||
pragma solidity >=0.4.22 <0.6; | ||
|
||
contract BugReport { | ||
function() external payable { //~ ERROR: expected a state variable declaration | ||
deposit(); | ||
uint | ||
} //~ ERROR: expected | ||
function deposit() public payable {} | ||
} |
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,19 @@ | ||
error: expected a state variable declaration | ||
--> ROOT/tests/ui/parser/old_fallback.sol:LL:CC | ||
| | ||
LL | function() external payable { | ||
| ^ | ||
| | ||
= note: this style of fallback function has been removed; use the `fallback` or `receive` keywords instead | ||
|
||
error: expected one of `(`, `.`, `;`, `?`, `[`, `payable`, `pure`, `view`, or `{`, found `}` | ||
--> ROOT/tests/ui/parser/old_fallback.sol:LL:CC | ||
| | ||
LL | uint | ||
| ^ expected one of 9 possible tokens | ||
LL | } | ||
| ^ unexpected token | ||
| | ||
|
||
error: aborting due to 2 previous errors | ||
|