Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ relationComplexityError.ts(12,5): error TS2859: Excessive complexity comparing t
==== relationComplexityError.ts (2 errors) ====
// Repro from #55630

type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
type T1 = `${Digits}${Digits}${Digits}${Digits}` | undefined;
type T2 = { a: string } | { b: number };

Expand Down
12 changes: 6 additions & 6 deletions tests/baselines/reference/relationComplexityError.symbols
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
=== relationComplexityError.ts ===
// Repro from #55630

type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
>Digits : Symbol(Digits, Decl(relationComplexityError.ts, 0, 0))

type T1 = `${Digits}${Digits}${Digits}${Digits}` | undefined;
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>Digits : Symbol(Digits, Decl(relationComplexityError.ts, 0, 0))
>Digits : Symbol(Digits, Decl(relationComplexityError.ts, 0, 0))
>Digits : Symbol(Digits, Decl(relationComplexityError.ts, 0, 0))
Expand All @@ -21,9 +21,9 @@ type T2 = { a: string } | { b: number };
function f1(x: T1, y: T1 & T2) {
>f1 : Symbol(f1, Decl(relationComplexityError.ts, 4, 40))
>x : Symbol(x, Decl(relationComplexityError.ts, 6, 12))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>y : Symbol(y, Decl(relationComplexityError.ts, 6, 18))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>T2 : Symbol(T2, Decl(relationComplexityError.ts, 3, 61))

x = y;
Expand All @@ -34,9 +34,9 @@ function f1(x: T1, y: T1 & T2) {
function f2(x: T1 | null, y: T1 & T2) {
>f2 : Symbol(f2, Decl(relationComplexityError.ts, 8, 1))
>x : Symbol(x, Decl(relationComplexityError.ts, 10, 12))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>y : Symbol(y, Decl(relationComplexityError.ts, 10, 25))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>T2 : Symbol(T2, Decl(relationComplexityError.ts, 3, 61))

x = y; // Complexity error
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/relationComplexityError.types
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

=== Performance Stats ===
Assignability cache: 2,500,000
Type Count: 25,000
Type Count: 10,000

=== relationComplexityError.ts ===
// Repro from #55630

type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
>Digits : Digits
> : ^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion tests/cases/compiler/relationComplexityError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// Repro from #55630

type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
type T1 = `${Digits}${Digits}${Digits}${Digits}` | undefined;
type T2 = { a: string } | { b: number };

Expand Down
Loading