mirror of https://github.com/tc39/test262.git
Add tests escaped/unescaped yield/await labels
This commit is contained in:
parent
3d8fe2af4c
commit
d887db88ee
|
@ -9,3 +9,4 @@ flags: [noStrict]
|
|||
---*/
|
||||
label: function g() {}
|
||||
|
||||
label1: label2: function f() {}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`await` is a reserved identifier in module code and may not be used as a label.
|
||||
info: |
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
|
||||
It is a Syntax Error if the goal symbol of the syntactic grammar is Module and
|
||||
the StringValue of IdentifierName is "await".
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
aw\u0061it: 1;
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`await` is a reserved identifier in module code and may not be used as a label.
|
||||
info: |
|
||||
LabelIdentifier : await
|
||||
|
||||
It is a Syntax Error if the goal symbol of the syntactic grammar is Module.
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [module]
|
||||
---*/
|
||||
|
||||
await: 1;
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`await` is not a reserved identifier in non-module code and may be used as a label.
|
||||
info: |
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
|
||||
It is a Syntax Error if the goal symbol of the syntactic grammar is Module and
|
||||
the StringValue of IdentifierName is "await".
|
||||
---*/
|
||||
|
||||
aw\u0061it: 1;
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`await` is not a reserved identifier in non-module code and may be used as a label.
|
||||
info: |
|
||||
LabelIdentifier : await
|
||||
|
||||
It is a Syntax Error if the goal symbol of the syntactic grammar is Module.
|
||||
---*/
|
||||
|
||||
await: 1;
|
|
@ -0,0 +1,11 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`yield` is not a reserved identifier in non-strict mode code and may be used as a label.
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
yi\u0065ld: 1;
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-identifiers-static-semantics-early-errors
|
||||
description: >
|
||||
`yield` is a reserved identifier in strict mode code and may not be used as a label.
|
||||
info: |
|
||||
Identifier : IdentifierName but not ReservedWord
|
||||
|
||||
It is a Syntax Error if this phrase is contained in strict mode code and the
|
||||
StringValue of IdentifierName is: "implements", "interface", "let", "package",
|
||||
"private", "protected", "public", "static", or "yield".
|
||||
negative:
|
||||
phase: early
|
||||
type: SyntaxError
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
yi\u0065ld: 1;
|
Loading…
Reference in New Issue