You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
7405bd1 enables the allowAwaitOutsideFunction option by default when ecmaVersion >= 2022. That was to support top-level await in ES2022, but it seems that the option allows more than it is allowed by the spec.
constacorn=require("acorn");// doesn't throw, but it should?acorn.parse("await foo();",{ecmaVersion: 2022,sourceType: "script"});// doesn't throw, but it should?acorn.parse("(class { x = await foo(); })",{ecmaVersion: 2022,sourceType: "module"});
The text was updated successfully, but these errors were encountered:
Acorn v8.4.0
7405bd1 enables the
allowAwaitOutsideFunction
option by default whenecmaVersion
>= 2022. That was to support top-levelawait
in ES2022, but it seems that the option allows more than it is allowed by the spec.The text was updated successfully, but these errors were encountered: