Disallow async functions as loop bodies (#9314)

This commit is contained in:
Nicolò Ribaudo
2019-01-17 23:07:48 +01:00
committed by Henry Zhu
parent a27b9b4299
commit 0a88230ec4
9 changed files with 27 additions and 62 deletions

View File

@@ -0,0 +1,3 @@
{
"throws": "Function declaration not allowed in this context (1:10)"
}

View File

@@ -0,0 +1 @@
while (1) foo: bar: function foo(){}

View File

@@ -0,0 +1,3 @@
{
"throws": "Function declaration not allowed in this context (1:20)"
}

View File

@@ -1,3 +0,0 @@
{
"throws": "Unexpected token (1:10)"
}

View File

@@ -0,0 +1 @@
while (1) async function foo(){}

View File

@@ -0,0 +1,3 @@
{
"throws": "Function declaration not allowed in this context (1:10)"
}