reftest-error-syntaxerror.js (543B)
1 // Copyright (C) 2017 Mozilla Corporation. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 author: Jeff Walden <jwalden+code@mit.edu> 6 esid: sec-let-and-const-declarations 7 description: | 8 Outside AsyncFunction, |await| is a perfectly cromulent LexicalDeclaration variable name. Therefore ASI doesn't apply, and so the |0| where a |=| was expected is a syntax error. 9 flags: [noStrict] 10 negative: 11 phase: parse 12 type: SyntaxError 13 ---*/ 14 function f() { 15 let 16 await 0; 17 } 18 $DONOTEVALUATE();