Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/dstr-assignment/array-rest-elision-invalid.case

This file was deleted.

22 changes: 22 additions & 0 deletions src/dstr-assignment/obj-rest-before-comma-invalid.case
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (C) 2017 Richard Gibson. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
desc: >
Object rest element cannot be followed by a comma in ObjectAssignmentPattern.
template: syntax
esid: prod-ObjectAssignmentPattern
negative:
phase: parse
type: SyntaxError
features: [object-rest]
---*/

//- setup
$DONOTEVALUATE();
var rest;
//- elems
{...rest,}
//- vals
{}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/*---
desc: >
Object rest element needs to be the last AssignmenProperty
Object rest element needs to be the last AssignmentProperty
in ObjectAssignmentPattern.
template: syntax
esid: pending
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// This file was procedurally generated from the following sources:
// - src/dstr-assignment/array-rest-elision-invalid.case
// - src/dstr-assignment/obj-rest-before-comma-invalid.case
// - src/dstr-assignment/syntax/assignment-expr.template
/*---
description: ArrayAssignmentPattern may not include elisions following an AssignmentRestElement in a AssignmentElementList. (AssignmentExpression)
description: Object rest element cannot be followed by a comma in ObjectAssignmentPattern. (AssignmentExpression)
esid: sec-variable-statement-runtime-semantics-evaluation
features: [destructuring-binding]
features: [object-rest, destructuring-binding]
flags: [generated]
negative:
phase: parse
Expand All @@ -19,5 +19,7 @@ info: |
BindingPattern passing rval and undefined as arguments.
---*/
$DONOTEVALUATE();
var rest;

0, [...x,] = [];
0, {...rest,} = {}
;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// - src/dstr-assignment/obj-rest-not-last-element-invalid.case
// - src/dstr-assignment/syntax/assignment-expr.template
/*---
description: Object rest element needs to be the last AssignmenProperty in ObjectAssignmentPattern. (AssignmentExpression)
description: Object rest element needs to be the last AssignmentProperty in ObjectAssignmentPattern. (AssignmentExpression)
esid: sec-variable-statement-runtime-semantics-evaluation
features: [object-rest, destructuring-binding]
flags: [generated]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// This file was procedurally generated from the following sources:
// - src/dstr-assignment/array-rest-elision-invalid.case
// - src/dstr-assignment/obj-rest-before-comma-invalid.case
// - src/dstr-assignment/syntax/for-in.template
/*---
description: ArrayAssignmentPattern may not include elisions following an AssignmentRestElement in a AssignmentElementList. (For..in statement)
description: Object rest element cannot be followed by a comma in ObjectAssignmentPattern. (For..in statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
features: [destructuring-binding]
features: [object-rest, destructuring-binding]
flags: [generated]
negative:
phase: parse
Expand All @@ -28,5 +28,7 @@ info: |
[...]
---*/
$DONOTEVALUATE();
var rest;

for ([...x,] in [[]]) ;
for ({...rest,} in [{}
]) ;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// - src/dstr-assignment/obj-rest-not-last-element-invalid.case
// - src/dstr-assignment/syntax/for-in.template
/*---
description: Object rest element needs to be the last AssignmenProperty in ObjectAssignmentPattern. (For..in statement)
description: Object rest element needs to be the last AssignmentProperty in ObjectAssignmentPattern. (For..in statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
features: [object-rest, destructuring-binding]
flags: [generated]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// This file was procedurally generated from the following sources:
// - src/dstr-assignment/array-rest-elision-invalid.case
// - src/dstr-assignment/obj-rest-before-comma-invalid.case
// - src/dstr-assignment/syntax/for-of.template
/*---
description: ArrayAssignmentPattern may not include elisions following an AssignmentRestElement in a AssignmentElementList. (For..of statement)
description: Object rest element cannot be followed by a comma in ObjectAssignmentPattern. (For..of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
features: [destructuring-binding]
features: [object-rest, destructuring-binding]
flags: [generated]
negative:
phase: parse
Expand All @@ -28,5 +28,7 @@ info: |
[...]
---*/
$DONOTEVALUATE();
var rest;

for ([...x,] of [[]]) ;
for ({...rest,} of [{}
]) ;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// - src/dstr-assignment/obj-rest-not-last-element-invalid.case
// - src/dstr-assignment/syntax/for-of.template
/*---
description: Object rest element needs to be the last AssignmenProperty in ObjectAssignmentPattern. (For..of statement)
description: Object rest element needs to be the last AssignmentProperty in ObjectAssignmentPattern. (For..of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
features: [object-rest, destructuring-binding]
flags: [generated]
Expand Down
Loading