test262/src/dstr-binding-for-await/obj-ptrn-prop-id-trailing-comma.case
Rick Waldron b1620ab5b8 src/dstr-binding-async-iteration => src/dstr-binding-for-await
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-22 13:23:12 -04:00

25 lines
536 B
Plaintext

// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
template: default
desc: Trailing comma is allowed following BindingPropertyList
info: |
13.3.3 Destructuring Binding Patterns
ObjectBindingPattern[Yield] :
{ }
{ BindingPropertyList[?Yield] }
{ BindingPropertyList[?Yield] , }
---*/
//- elems
{ x: y, }
//- vals
{ x: 23 }
//- body
assert.sameValue(y, 23);
assert.throws(ReferenceError, function() {
x;
});