Skip to content

Commit 9c3f976

Browse files
committed
Testing parsing of some special syntactically invalid arrow functions.
1 parent 13149f5 commit 9c3f976

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
6+
*/
7+
8+
load('assert.js');
9+
10+
assertThrows(function() {
11+
eval('+async()=>{}');
12+
}, SyntaxError);
13+
14+
assertThrows(function() {
15+
eval('async function f() { await async()=>{}; }');
16+
}, SyntaxError);

0 commit comments

Comments
 (0)