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 16let a = (x: int): void 17=> {}; 18 19let a = (x 20 => 10); 21 22let a = (x: int, y:int): void) => {}; 23 24a # 19; 25a#name; 26 27let x = new.target(17); 28let x = new import("file.ts"); 29let x = new Type(a, ...); 30let x = new Type(1, 2, ; 31// This expression should be the last to test EOS. 32 33/* @@? 17:1 Error SyntaxError: expected '=>' on the same line after an argument list, got line terminator */ 34/* @@? 20:10 Error SyntaxError: Uncaught SyntaxError: expected expression, got '=>' */ 35/* @@? 20:10 Error SyntaxError: expected '=>' on the same line after an argument list, got line terminator */ 36/* @@? 22:13 Error SyntaxError: Unexpected token. */ 37/* @@? 22:20 Error SyntaxError: Unexpected token. */ 38/* @@? 22:24 Error SyntaxError: Unexpected token ':'. */ 39/* @@? 22:24 Error SyntaxError: Unexpected token: ':'. */ 40/* @@? 22:30 Error SyntaxError: Unexpected token: ')'. */ 41/* @@? 22:30 Error SyntaxError: Unexpected token: ')'. */ 42/* @@? 22:32 Error SyntaxError: Unexpected token: '=>'. */ 43/* @@? 24:3 Error SyntaxError: Unexpected token '#'. */ 44/* @@? 24:5 Error SyntaxError: Unexpected token in private field */ 45/* @@? 25:2 Error SyntaxError: Unexpected token '#'. */ 46/* @@? 25:7 Error SyntaxError: Unexpected private identifier */ 47/* @@? 27:1 Error SyntaxError: Unexpected token: 'let'. */ 48/* @@? 27:13 Error SyntaxError: 'new.Target' is not allowed here */ 49/* @@? 28:30 Error SyntaxError: Cannot use new with import(...) */ 50/* @@? 29:24 Error SyntaxError: Unexpected token: ')'. */ 51/* @@? 30:24 Error SyntaxError: Unexpected token: ';'. */ 52/* @@? 54:1 Error SyntaxError: Unexpected token: 'eos'. */ 53/* @@? 54:1 Error SyntaxError: Unexpected token in argument parsing */ 54