Test for [no LineTerminator here] after 'async' for arrows and methods

This commit is contained in:
Shu-yu Guo 2017-03-09 14:25:35 -08:00 committed by Leo Balter
parent 7e87c73912
commit 5038754462
No known key found for this signature in database
GPG Key ID: 2C75F319D398E36B
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,13 @@
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-AsyncArrowHead
description: async arrows cannot have a line terminator between "async" and the formals
negative:
phase: early
type: SyntaxError
---*/
async
(foo,bar) => { }

View File

@ -0,0 +1,13 @@
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-AsyncArrowFunction
description: async arrows cannot have a line terminator between "async" and the AsyncArrowBindingIdentifier
negative:
phase: early
type: ReferenceError
---*/
async
foo => { }

View File

@ -0,0 +1,15 @@
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-AsyncMethod
description: async methods cannot have a line terminator between "async" and the property name
negative:
phase: early
type: SyntaxError
---*/
{
async
foo () { }
}