From ea48dedd7df0ceba4ce18623600f3daf4a3ebf69 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 13 Nov 2025 13:44:23 -0800 Subject: [PATCH] Shrink relationComplexityError test size (#62754) --- .../reference/relationComplexityError.errors.txt | 2 +- .../reference/relationComplexityError.symbols | 12 ++++++------ .../reference/relationComplexityError.types | 4 ++-- tests/cases/compiler/relationComplexityError.ts | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/baselines/reference/relationComplexityError.errors.txt b/tests/baselines/reference/relationComplexityError.errors.txt index e6753e6b596..1a00aed2aaa 100644 --- a/tests/baselines/reference/relationComplexityError.errors.txt +++ b/tests/baselines/reference/relationComplexityError.errors.txt @@ -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 }; diff --git a/tests/baselines/reference/relationComplexityError.symbols b/tests/baselines/reference/relationComplexityError.symbols index c6f5914c6ae..d0cbb9ffcdf 100644 --- a/tests/baselines/reference/relationComplexityError.symbols +++ b/tests/baselines/reference/relationComplexityError.symbols @@ -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)) @@ -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; @@ -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 diff --git a/tests/baselines/reference/relationComplexityError.types b/tests/baselines/reference/relationComplexityError.types index 7dc3bf2ecf4..5214e3eb83b 100644 --- a/tests/baselines/reference/relationComplexityError.types +++ b/tests/baselines/reference/relationComplexityError.types @@ -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 > : ^^^^^^ diff --git a/tests/cases/compiler/relationComplexityError.ts b/tests/cases/compiler/relationComplexityError.ts index 5d4bad22598..7b81443d97c 100644 --- a/tests/cases/compiler/relationComplexityError.ts +++ b/tests/cases/compiler/relationComplexityError.ts @@ -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 };