2014-07-22 01:09:02 +02:00
|
|
|
// Copyright (c) 2012 Ecma International. All rights reserved.
|
2015-07-17 17:42:45 +02:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
2014-07-22 01:09:02 +02:00
|
|
|
|
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2014-07-22 01:09:02 +02:00
|
|
|
Refer 11.1.5;
|
|
|
|
The production
|
|
|
|
PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
|
|
|
|
4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
|
|
|
|
a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 11.1.5_4-4-a-3
|
2014-07-22 01:09:02 +02:00
|
|
|
description: >
|
|
|
|
Object literal - Duplicate data property name allowed gets last
|
|
|
|
defined value
|
|
|
|
---*/
|
|
|
|
|
|
|
|
var o = eval("({foo:0,foo:1});");
|
2015-08-06 18:31:44 +02:00
|
|
|
|
|
|
|
assert.sameValue(o.foo, 1, 'o.foo');
|