diff --git a/crates/oxc_linter/src/rules/typescript/array_type.rs b/crates/oxc_linter/src/rules/typescript/array_type.rs index b004d709ac570..9d328559c01f5 100644 --- a/crates/oxc_linter/src/rules/typescript/array_type.rs +++ b/crates/oxc_linter/src/rules/typescript/array_type.rs @@ -1272,10 +1272,6 @@ const instance = new MyClass(42);", "type fooIntersection = Array;", Some(serde_json::json!([{"default":"array"}])), ), - ("let x: Array;", Some(serde_json::json!([{"default":"array"}]))), - ("let x: Array<>;", Some(serde_json::json!([{"default":"array"}]))), - ("let x: Array;", Some(serde_json::json!([{"default":"array-simple"}]))), - ("let x: Array<>;", Some(serde_json::json!([{"default":"array-simple"}]))), ( "let x: Array = [1] as number[];", Some(serde_json::json!([{"default":"generic"}])), @@ -1906,10 +1902,6 @@ export const test8 = testFn, number[]>([]);", "type fooIntersection = (string & number)[];", Some(serde_json::json!([{"default":"array"}])), ), - ("let x: Array;", "let x: any[];", Some(serde_json::json!([{"default":"array"}]))), - ("let x: Array<>;", "let x: any[];", Some(serde_json::json!([{"default":"array"}]))), - ("let x: Array;", "let x: any[];", Some(serde_json::json!([{"default":"array-simple"}]))), - ("let x: Array<>;", "let x: any[];", Some(serde_json::json!([{"default":"array-simple"}]))), ( "let x: Array = [1] as number[];", "let x: Array = [1] as Array;", diff --git a/crates/oxc_linter/src/snapshots/typescript_array_type.snap b/crates/oxc_linter/src/snapshots/typescript_array_type.snap index 36538267f8670..e5681a421fdc8 100644 --- a/crates/oxc_linter/src/snapshots/typescript_array_type.snap +++ b/crates/oxc_linter/src/snapshots/typescript_array_type.snap @@ -541,34 +541,6 @@ source: crates/oxc_linter/src/tester.rs ╰──── help: Replace `Array` with `(string & number)[]`. - ⚠ typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'any[]' instead. - ╭─[array_type.ts:1:8] - 1 │ let x: Array; - · ───── - ╰──── - help: Replace `Array` with `any[]`. - - ⚠ typescript-eslint(array-type): Array type using 'Array' is forbidden. Use 'any[]' instead. - ╭─[array_type.ts:1:8] - 1 │ let x: Array<>; - · ─────── - ╰──── - help: Replace `Array<>` with `any[]`. - - ⚠ typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'any[]' instead. - ╭─[array_type.ts:1:8] - 1 │ let x: Array; - · ───── - ╰──── - help: Replace `Array` with `any[]`. - - ⚠ typescript-eslint(array-type): Array type using 'Array' is forbidden for simple types. Use 'any[]' instead. - ╭─[array_type.ts:1:8] - 1 │ let x: Array<>; - · ─────── - ╰──── - help: Replace `Array<>` with `any[]`. - ⚠ typescript-eslint(array-type): Array type using 'number[]' is forbidden. Use 'Array' instead. ╭─[array_type.ts:1:31] 1 │ let x: Array = [1] as number[]; diff --git a/crates/oxc_parser/src/diagnostics.rs b/crates/oxc_parser/src/diagnostics.rs index 28ef47ae0d598..0371ea27a6bfd 100644 --- a/crates/oxc_parser/src/diagnostics.rs +++ b/crates/oxc_parser/src/diagnostics.rs @@ -412,6 +412,11 @@ pub fn ts_empty_type_parameter_list(span: Span) -> OxcDiagnostic { ts_error("1098", "Type parameter list cannot be empty.").with_label(span) } +#[cold] +pub fn ts_empty_type_argument_list(span: Span) -> OxcDiagnostic { + ts_error("1099", "Type argument list cannot be empty.").with_label(span) +} + #[cold] pub fn unexpected_super(span: Span) -> OxcDiagnostic { OxcDiagnostic::error("'super' can only be used with function calls or in property accesses") diff --git a/crates/oxc_parser/src/ts/types.rs b/crates/oxc_parser/src/ts/types.rs index 5c04a117077b8..487e0b0e9b4a4 100644 --- a/crates/oxc_parser/src/ts/types.rs +++ b/crates/oxc_parser/src/ts/types.rs @@ -818,9 +818,11 @@ impl<'a> ParserImpl<'a> { let (params, _) = self.parse_delimited_list(Kind::RAngle, Kind::Comma, Self::parse_ts_type); self.expect(Kind::RAngle); - return Some( - self.ast.alloc_ts_type_parameter_instantiation(self.end_span(span), params), - ); + let span = self.end_span(span); + if params.is_empty() { + self.error(diagnostics::ts_empty_type_argument_list(span)); + } + return Some(self.ast.alloc_ts_type_parameter_instantiation(span, params)); } None } @@ -834,9 +836,11 @@ impl<'a> ParserImpl<'a> { let (params, _) = self.parse_delimited_list(Kind::RAngle, Kind::Comma, Self::parse_ts_type); self.expect(Kind::RAngle); - return Some( - self.ast.alloc_ts_type_parameter_instantiation(self.end_span(span), params), - ); + let span = self.end_span(span); + if params.is_empty() { + self.error(diagnostics::ts_empty_type_argument_list(span)); + } + return Some(self.ast.alloc_ts_type_parameter_instantiation(span, params)); } None } @@ -859,7 +863,11 @@ impl<'a> ParserImpl<'a> { if !self.can_follow_type_arguments_in_expr() { return self.unexpected(); } - self.ast.alloc_ts_type_parameter_instantiation(self.end_span(span), params) + let span = self.end_span(span); + if params.is_empty() { + self.error(diagnostics::ts_empty_type_argument_list(span)); + } + self.ast.alloc_ts_type_parameter_instantiation(span, params) } fn can_follow_type_arguments_in_expr(&mut self) -> bool { diff --git a/tasks/coverage/misc/fail/oxc-13617-1.ts b/tasks/coverage/misc/fail/oxc-13617-1.ts new file mode 100644 index 0000000000000..4bea721dc96d0 --- /dev/null +++ b/tasks/coverage/misc/fail/oxc-13617-1.ts @@ -0,0 +1 @@ +foo<>() \ No newline at end of file diff --git a/tasks/coverage/misc/fail/oxc-13617-2.ts b/tasks/coverage/misc/fail/oxc-13617-2.ts new file mode 100644 index 0000000000000..62ec856e8d5d2 --- /dev/null +++ b/tasks/coverage/misc/fail/oxc-13617-2.ts @@ -0,0 +1 @@ +new Foo<>() \ No newline at end of file diff --git a/tasks/coverage/misc/fail/oxc-13617-3.ts b/tasks/coverage/misc/fail/oxc-13617-3.ts new file mode 100644 index 0000000000000..f2e3600e89d8b --- /dev/null +++ b/tasks/coverage/misc/fail/oxc-13617-3.ts @@ -0,0 +1 @@ +class Foo {property: Bar<> = 1} \ No newline at end of file diff --git a/tasks/coverage/misc/fail/oxc-13617-4.ts b/tasks/coverage/misc/fail/oxc-13617-4.ts new file mode 100644 index 0000000000000..80402f1264a04 --- /dev/null +++ b/tasks/coverage/misc/fail/oxc-13617-4.ts @@ -0,0 +1 @@ +const foo: Foo<> = 1 \ No newline at end of file diff --git a/tasks/coverage/snapshots/parser_babel.snap b/tasks/coverage/snapshots/parser_babel.snap index bab61b35bbe73..921ab550a9390 100644 --- a/tasks/coverage/snapshots/parser_babel.snap +++ b/tasks/coverage/snapshots/parser_babel.snap @@ -3,7 +3,7 @@ commit: 41d96516 parser_babel Summary: AST Parsed : 2407/2423 (99.34%) Positive Passed: 2385/2423 (98.43%) -Negative Passed: 1649/1755 (93.96%) +Negative Passed: 1665/1755 (94.87%) Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/core/categorized/invalid-startindex-and-startline-specified-without-startcolumn/input.js Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/core/categorized/startline-and-startcolumn-specified/input.js @@ -158,38 +158,6 @@ Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/ty Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/regression/keyword-qualified-type-disallowed-babel-7/input.ts -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-function/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-function-babel-7/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-extends/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-extends-babel-7/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-implements/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-implements-babel-7/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-new/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-new-babel-7/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-superclass/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-superclass-babel-7/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-tsx/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-tsx-babel-7/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-import/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-import-babel-7/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-ref/input.ts - -Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-ref-babel-7/input.ts - Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/instantiation-expression-property-access/input.ts Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/type-arguments/instantiation-expression-property-access-babel-7/input.ts @@ -14203,6 +14171,102 @@ Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typesc · ── ╰──── + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-function/input.ts:1:4] + 1 │ foo<>() + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-function-babel-7/input.ts:1:4] + 1 │ foo<>() + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-extends/input.ts:1:22] + 1 │ interface A extends B<> {} + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-extends-babel-7/input.ts:1:22] + 1 │ interface A extends B<> {} + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-implements/input.ts:1:21] + 1 │ class A implements B<> {} + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-implements-babel-7/input.ts:1:21] + 1 │ class A implements B<> {} + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-new/input.ts:1:6] + 1 │ new A<>(); + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-new-babel-7/input.ts:1:6] + 1 │ new A<>(); + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-superclass/input.ts:1:18] + 1 │ class A extends B<> {} + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-superclass-babel-7/input.ts:1:18] + 1 │ class A extends B<> {} + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-tsx/input.ts:1:14] + 1 │ var a = > + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-tsx-babel-7/input.ts:1:14] + 1 │ var a = > + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-import/input.ts:1:18] + 1 │ let a: import("")<>; + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-import-babel-7/input.ts:1:18] + 1 │ let a: import("")<>; + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-ref/input.ts:1:11] + 1 │ let a: Foo<>; + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-ref-babel-7/input.ts:1:11] + 1 │ let a: Foo<>; + · ── + ╰──── + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/new-without-arguments-missing-semicolon/input.ts:1:9] 1 │ new A if (0); diff --git a/tasks/coverage/snapshots/parser_misc.snap b/tasks/coverage/snapshots/parser_misc.snap index d7dae9d54f697..aee9f04416dae 100644 --- a/tasks/coverage/snapshots/parser_misc.snap +++ b/tasks/coverage/snapshots/parser_misc.snap @@ -1,7 +1,7 @@ parser_misc Summary: AST Parsed : 49/49 (100.00%) Positive Passed: 49/49 (100.00%) -Negative Passed: 86/86 (100.00%) +Negative Passed: 90/90 (100.00%) × Cannot assign to 'arguments' in strict mode ╭─[misc/fail/arguments-eval.ts:1:10] @@ -2833,6 +2833,30 @@ Negative Passed: 86/86 (100.00%) 17 │ }; ╰──── + × TS(1099): Type argument list cannot be empty. + ╭─[misc/fail/oxc-13617-1.ts:1:4] + 1 │ foo<>() + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[misc/fail/oxc-13617-2.ts:1:8] + 1 │ new Foo<>() + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[misc/fail/oxc-13617-3.ts:1:25] + 1 │ class Foo {property: Bar<> = 1} + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[misc/fail/oxc-13617-4.ts:1:15] + 1 │ const foo: Foo<> = 1 + · ── + ╰──── + × Unexpected token ╭─[misc/fail/oxc-169.js:2:1] 1 │ 1<(V=82< diff --git a/tasks/coverage/snapshots/parser_typescript.snap b/tasks/coverage/snapshots/parser_typescript.snap index 253b20970415d..bb03c60f6f639 100644 --- a/tasks/coverage/snapshots/parser_typescript.snap +++ b/tasks/coverage/snapshots/parser_typescript.snap @@ -3,7 +3,7 @@ commit: 261630d6 parser_typescript Summary: AST Parsed : 8814/8816 (99.98%) Positive Passed: 8803/8816 (99.85%) -Negative Passed: 1442/3535 (40.79%) +Negative Passed: 1449/3535 (40.99%) Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ExportAssignment7.ts Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ExportAssignment8.ts @@ -600,14 +600,8 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/elidedJSImpo Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/emitDecoratorMetadata_isolatedModules.ts -Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/emptyGenericParamList.ts - Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/emptyThenWarning.ts -Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/emptyTypeArgumentList.ts - -Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/emptyTypeArgumentListWithNew.ts - Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/ensureNoCrashExportAssignmentDefineProperrtyPotentialMerge.ts Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/enumAssignmentCompat7.ts @@ -1054,8 +1048,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/instanceofOp Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/instanceofWithStructurallyIdenticalTypes.ts -Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/instantiateTypeParameter.ts - Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/instantiationExpressionErrorNoCrash.ts Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/interfaceAssignmentCompat.ts @@ -1198,8 +1190,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/jsxFragmentF Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/jsxImportSourceNonPragmaComment.tsx -Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/jsxIntrinsicElementsTypeArgumentErrors.tsx - Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/compiler/jsxNamespacePrefixIntrinsics.tsx @@ -3364,8 +3354,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxSt Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments4.tsx -Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxTypeArgumentResolution.tsx - Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxUnionElementType6.tsx Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/jsx/tsxUnionTypeComponent2.tsx @@ -4110,8 +4098,6 @@ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/types/typ Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiateNonGenericTypeWithTypeArguments.ts -Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressions.ts - Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints4.ts Expect Syntax Error: tasks/coverage/typescript/tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints5.ts @@ -7581,6 +7567,13 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc 24 │ } ╰──── + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/compiler/emptyGenericParamList.ts:2:9] + 1 │ class I {} + 2 │ var x: I<>; + · ── + ╰──── + × Empty parenthesized expression ╭─[typescript/tests/cases/compiler/emptyMemberAccess.ts:3:4] 2 │ @@ -7589,6 +7582,36 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc 4 │ ╰──── + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/compiler/emptyTypeArgumentList.ts:2:4] + 1 │ function foo() { } + 2 │ foo<>(); + · ── + 3 │ + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/compiler/emptyTypeArgumentList.ts:6:9] + 5 │ function noParams() {} + 6 │ noParams<>(); + · ── + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/compiler/emptyTypeArgumentListWithNew.ts:2:8] + 1 │ class foo { } + 2 │ new foo<>(); + · ── + 3 │ + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/compiler/emptyTypeArgumentListWithNew.ts:6:13] + 5 │ class noParams {} + 6 │ new noParams<>(); + · ── + ╰──── + × Expected a semicolon or an implicit semicolon after a statement, but found none ╭─[typescript/tests/cases/compiler/enumConflictsWithGlobalIdentifier.ts:5:4] 4 │ var x = IgnoreRulesSpecific. @@ -8837,6 +8860,14 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc ╰──── help: Try insert a semicolon here + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/compiler/instantiateTypeParameter.ts:2:13] + 1 │ interface Foo { + 2 │ var x: T<>; + · ── + 3 │ } + ╰──── + × TS(1021): An index signature must have a type annotation. ╭─[typescript/tests/cases/compiler/intTypeCheck.ts:37:5] 36 │ //Index Signatures @@ -9226,6 +9257,22 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc 6 │ ╰──── + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/compiler/jsxIntrinsicElementsTypeArgumentErrors.tsx:5:15] + 4 │ // opening + closing + 5 │ const a = >; // empty type args + · ── + 6 │ + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/compiler/jsxIntrinsicElementsTypeArgumentErrors.tsx:18:15] + 17 │ // self-closing + 18 │ const g = />; // empty type args + · ── + 19 │ + ╰──── + × Unexpected token ╭─[typescript/tests/cases/compiler/jsxNamespacePrefixInName.tsx:7:32] 6 │ @@ -21926,6 +21973,22 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc 42 │ } ╰──── + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/conformance/jsx/tsxTypeArgumentResolution.tsx:24:12] + 23 │ + 24 │ x = a={10} b="hi" />; // error + · ── + 25 │ + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/conformance/jsx/tsxTypeArgumentResolution.tsx:26:12] + 25 │ + 26 │ x = a={10} b="hi">; // error + · ── + 27 │ + ╰──── + × Expected corresponding JSX closing tag for '\u0061'. ╭─[typescript/tests/cases/conformance/jsx/unicodeEscapesInJsxtags.tsx:15:4] 14 │ // tag name: @@ -27675,6 +27738,38 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/parser/ecmasc 19 │ const a9 = (f); // Error, no applicable signatures ╰──── + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressions.ts:6:16] + 5 │ function f1() { + 6 │ let f0 = fx<>; // Error + · ── + 7 │ let f1 = fx; // { (x: string): string; (x: string, n: number): string; } + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressions.ts:12:21] + 11 │ + 12 │ type T10 = typeof fx<>; // Error + · ── + 13 │ type T11 = typeof fx; // { (x: string): string; (x: string, n: number): string; } + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressions.ts:18:21] + 17 │ function f2() { + 18 │ const A0 = Array<>; // Error + · ── + 19 │ const A1 = Array; // new (...) => string[] + ╰──── + + × TS(1099): Type argument list cannot be empty. + ╭─[typescript/tests/cases/conformance/types/typeParameters/typeArgumentLists/instantiationExpressions.ts:23:24] + 22 │ + 23 │ type T20 = typeof Array<>; // Error + · ── + 24 │ type T21 = typeof Array; // new (...) => string[] + ╰──── + × TS(1273): 'public' modifier cannot be used on a type parameter. ╭─[typescript/tests/cases/conformance/types/typeParameters/typeParameterLists/varianceAnnotations.ts:95:10] 94 │