Debian Codegraph @

js/src/tests/test262/language/expressions/object/ident-name-method-def-function-escaped.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/identifier-names/function-escaped.case
3 // - src/identifier-names/default/obj-method-definition.template
4 /*---
5 description: function is a valid identifier name, using 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 \u0066unction() { return 42; }
40 };
41
42 assert.sameValue(obj['function'](), 42, 'property exists');
43
44 reportCompare(0, 0);