mirror of
https://github.com/tc39/test262.git
synced 2025-07-30 01:14:56 +02:00
Add template for ObjectAssignment using identifier names like reserved words
This commit is contained in:
parent
f7c89547e6
commit
eff2850ca3
@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (C) 2019 Leo Balter. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
/*---
|
||||||
|
path: language/expressions/assignment/dstr/ident-name-prop-name-literal-
|
||||||
|
name: PropertyName of an ObjectAssignmentPattern
|
||||||
|
esid: prod-AssignmentPattern
|
||||||
|
info: |
|
||||||
|
AssignmentPattern:
|
||||||
|
ObjectAssignmentPattern
|
||||||
|
|
||||||
|
ObjectAssignmentPattern:
|
||||||
|
{ AssignmentPropertyList }
|
||||||
|
|
||||||
|
AssignmentPropertyList:
|
||||||
|
AssignmentProperty
|
||||||
|
AssignmentPropertyList , AssignmentProperty
|
||||||
|
|
||||||
|
AssignmentProperty:
|
||||||
|
IdentifierReference Initializer_opt
|
||||||
|
PropertyName : AssignmentElement
|
||||||
|
|
||||||
|
PropertyName:
|
||||||
|
LiteralPropertyName
|
||||||
|
...
|
||||||
|
|
||||||
|
LiteralPropertyName:
|
||||||
|
IdentifierName
|
||||||
|
...
|
||||||
|
|
||||||
|
Reserved Words
|
||||||
|
|
||||||
|
A reserved word is an IdentifierName that cannot be used as an Identifier.
|
||||||
|
---*/
|
||||||
|
|
||||||
|
0, { /*{ declareWith }*/: x } = { /*{ referenceWith }*/: 42 };
|
||||||
|
|
||||||
|
assert.sameValue(x, 42, 'property exists');
|
Loading…
x
Reference in New Issue
Block a user