cpn-obj-lit-computed-property-name-from-integer-separators.js (914B)
1 // This file was procedurally generated from the following sources: 2 // - src/computed-property-names/computed-property-name-from-integer-separators.case 3 // - src/computed-property-names/evaluation/object-literal.template 4 /*--- 5 description: Computed property name from integer with separators (ComputedPropertyName in ObjectLiteral) 6 esid: prod-ComputedPropertyName 7 features: [computed-property-names] 8 flags: [generated] 9 info: | 10 ObjectLiteral: 11 { PropertyDefinitionList } 12 13 PropertyDefinitionList: 14 PropertyDefinition 15 16 PropertyDefinition: 17 PropertyName: AssignmentExpression 18 19 PropertyName: 20 ComputedPropertyName 21 22 ComputedPropertyName: 23 [ AssignmentExpression ] 24 ---*/ 25 26 27 let o = { 28 [1_2_3_4_5_6_7_8]: 1_2_3_4_5_6_7_8 29 }; 30 31 assert.sameValue( 32 o[1_2_3_4_5_6_7_8], 33 1_2_3_4_5_6_7_8 34 ); 35 assert.sameValue( 36 o[String(1_2_3_4_5_6_7_8)], 37 1_2_3_4_5_6_7_8 38 ); 39 40 reportCompare(0, 0);