mirror of
https://github.com/bellard/quickjs.git
synced 2025-05-29 01:49:18 +08:00
fixed parsing of function definition
This commit is contained in:
parent
3dc7ef1f7f
commit
02a2643142
@ -35353,7 +35353,7 @@ static __exception int js_parse_function_decl2(JSParseState *s,
|
||||
push_scope(s); /* enter body scope */
|
||||
fd->body_scope = fd->scope_level;
|
||||
|
||||
if (s->token.val == TOK_ARROW) {
|
||||
if (s->token.val == TOK_ARROW && func_type == JS_PARSE_FUNC_ARROW) {
|
||||
if (next_token(s))
|
||||
goto fail;
|
||||
|
||||
|
@ -28,7 +28,6 @@ test262/test/staging/sm/async-functions/await-error.js:12: Test262Error: Expecte
|
||||
test262/test/staging/sm/async-functions/await-in-arrow-parameters.js:33: Error: Assertion failed: expected exception SyntaxError, no exception thrown - AsyncFunction:(a = (b = await/r/g) => {}) => {}
|
||||
test262/test/staging/sm/class/boundFunctionSubclassing.js:12: Test262Error: Expected SameValue(«false», «true») to be true
|
||||
test262/test/staging/sm/class/compPropNames.js:26: Error: Expected syntax error: ({[1, 2]: 3})
|
||||
test262/test/staging/sm/class/methDefn.js:26: Error: Expected syntax error: b = {a() => 0}
|
||||
test262/test/staging/sm/class/strictExecution.js:32: Error: Assertion failed: expected exception TypeError, no exception thrown
|
||||
test262/test/staging/sm/class/superPropOrdering.js:83: Error: Assertion failed: expected exception TypeError, no exception thrown
|
||||
test262/test/staging/sm/expressions/optional-chain.js:25: Error: Assertion failed: expected exception SyntaxError, no exception thrown
|
||||
|
Loading…
x
Reference in New Issue
Block a user