Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow await inside async arrow params (#10469)
* Disallow await inside async arrow params * Use -1 as default for awaitPos/yieldPos
- Loading branch information
1 parent
fa5057f
commit a219b6d
Showing
11 changed files
with
526 additions
and
41 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
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
1 change: 1 addition & 0 deletions
1
...2017/async-functions/await-binding-inside-arrow-params-inside-async-arrow-params/input.js
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 @@ | ||
async (a = ({ await }) => {}) => {}; |
3 changes: 3 additions & 0 deletions
3
.../async-functions/await-binding-inside-arrow-params-inside-async-arrow-params/options.json
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,3 @@ | ||
{ | ||
"throws": "Await cannot be used as name inside an async function (1:20)" | ||
} |
3 changes: 3 additions & 0 deletions
3
...ions/await-inside-async-call-inside-parameters-of-function-inside-async-function/input.js
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,3 @@ | ||
async function f() { | ||
function g(x = async(await)) {} | ||
} |
Oops, something went wrong.