diff --git a/tests/cases/conformance/types/conditional/inferTypes1.ts b/tests/cases/conformance/types/conditional/inferTypes1.ts index 08c7be5288e..99cfa8a2460 100644 --- a/tests/cases/conformance/types/conditional/inferTypes1.ts +++ b/tests/cases/conformance/types/conditional/inferTypes1.ts @@ -127,3 +127,8 @@ type B1 = S extends A1 ? [T, U] : never; type A2 = [T, U]; type B2 = S extends A2 ? [T, U] : never; type C2 = S extends A2 ? [T, U] : never; + +// Repro from #21735 + +type A = T extends string ? { [P in T]: void; } : T; +type B = string extends T ? { [P in T]: void; } : T; // Error