Huáng Jùnliàng 6e57617138
Fix await binding error within static block (#13088)
* fix: allow await within SCOPE_FUNCTION under static block

* perf: scan scopeStack for once

* add new test case

* chore: update allowlist
2021-07-16 10:35:19 -04:00

12 lines
305 B
JavaScript

var C;
C = class { static { function f() { await } } };
C = class { static { function f(await) {} } };
C = class { static { function f(x = await) {} } };
C = class { static { function f({ [await]: x }) {} } };
// await in function expression is allowed
C = class { static { (function await() {}) } };