**Steps to reproduce** 1. Open the console 2. Evaluate `await new Promise())` **Expected results** I get the same error as when I only type `Promise())`: `SyntaxError: unexpected token: ')'` **Actual results** The following error is displayed: `SyntaxError: await is only valid in async functions and async generators` --- The error is very confusing since we should now support top-level await.
Bug 1494726 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
**Steps to reproduce** 1. Open the console 2. Evaluate `await new Promise())` **Expected results** I get the same error as when I only type `Promise())`: `SyntaxError: unexpected token: ')'` **Actual results** The following error is displayed: `SyntaxError: await is only valid in async functions and async generators` --- The error is very confusing since we should now support top-level await.