tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

11.1.5_4-4-a-3.js (745B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: |
      6    Refer 11.1.5; 
      7    The production
      8    PropertyNameAndValueList :  PropertyNameAndValueList , PropertyAssignment
      9    4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
     10    a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true
     11 es5id: 11.1.5_4-4-a-3
     12 description: >
     13    Object literal - Duplicate data property name allowed gets last
     14    defined value
     15 ---*/
     16 
     17  var o = eval("({foo:0,foo:1});");
     18 
     19 assert.sameValue(o.foo, 1, 'o.foo');
     20 
     21 reportCompare(0, 0);