• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16class 12 {}
17
18class A {
19    #x;
20    #x;
21
22    async get abc() {}
23
24    static static s;
25
26    #get abc() {
27        return s;
28    }
29
30    #constructor(x) {
31        this.s = x;
32    }
33
34    static constructor() {}
35    static prototype() {}
36
37    constructor;
38    static prototype;
39
40    constructor() {}
41    constructor() {}
42
43    async constructor() {}
44}
45
46function f(eval, arguments) {}
47
48for (var i of a) {
49    continue label;
50}
51
52/* @@? 16:7 Error SyntaxError: Unexpected token, expected an identifier. */
53/* @@? 16:10 Error SyntaxError: Unexpected token '{'. */
54/* @@? 22:5 Error SyntaxError: Private field has already been declared */
55/* @@? 22:15 Error SyntaxError: Invalid accessor */
56/* @@? 24:12 Error SyntaxError: Unexpected modifier */
57/* @@? 24:12 Error SyntaxError: Duplicated modifier is not allowed */
58/* @@? 26:6 Error SyntaxError: Unexpected identifier */
59/* @@? 30:6 Error SyntaxError: Private identifier can not be constructor */
60/* @@? 35:12 Error SyntaxError: Classes may not have static property named prototype */
61/* @@? 37:5 Error SyntaxError: Classes may not have a field named 'constructor' */
62/* @@? 38:12 Error SyntaxError: Classes may not have static property named prototype */
63/* @@? 40:5 Error SyntaxError: Multiple constructor implementations are not allowed. */
64/* @@? 41:5 Error SyntaxError: Multiple constructor implementations are not allowed. */
65/* @@? 43:11 Error SyntaxError: Constructor can not be special method */
66/* @@? 43:5 Error SyntaxError: Multiple constructor implementations are not allowed. */
67/* @@? 46:12 Error SyntaxError: 'eval' or 'arguments' can't be defined or assigned to in strict mode code */
68/* @@? 46:18 Error SyntaxError: 'eval' or 'arguments' can't be defined or assigned to in strict mode code */
69/* @@? 49:14 Error SyntaxError: Undefined label */
70