decl-async-fun.js (596B)
1 // |reftest| error:SyntaxError 2 // Copyright (C) 2017 André Bargull. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-with-statement 7 description: > 8 AsyncFunctionDeclaration is not allowed in statement position 9 info: | 10 ExpressionStatement[Yield, Await] : 11 [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] 12 Expression[+In, ?Yield, ?Await] ; 13 negative: 14 phase: parse 15 type: SyntaxError 16 features: [async-functions] 17 flags: [noStrict] 18 ---*/ 19 20 $DONOTEVALUATE(); 21 22 with ({}) async function f() {}