ident-name-method-def-default-escaped-ext.js (1021B)
1 // This file was procedurally generated from the following sources: 2 // - src/identifier-names/default-escaped-ext.case 3 // - src/identifier-names/default/obj-method-definition.template 4 /*--- 5 description: default is a valid identifier name, using extended escape (MethodDefinition) 6 esid: prod-PropertyDefinition 7 flags: [generated] 8 info: | 9 ObjectLiteral : 10 { PropertyDefinitionList } 11 { PropertyDefinitionList , } 12 13 PropertyDefinitionList: 14 PropertyDefinition 15 PropertyDefinitionList , PropertyDefinition 16 17 PropertyDefinition: 18 MethodDefinition 19 ... 20 21 MethodDefinition: 22 PropertyName ( UniqueFormalParameters ){ FunctionBody } 23 24 PropertyName: 25 LiteralPropertyName 26 ... 27 28 LiteralPropertyName: 29 IdentifierName 30 ... 31 32 Reserved Words 33 34 A reserved word is an IdentifierName that cannot be used as an Identifier. 35 ---*/ 36 37 38 var obj = { 39 def\u{61}ult() { return 42; } 40 }; 41 42 assert.sameValue(obj['default'](), 42, 'property exists'); 43 44 reportCompare(0, 0);