@@ -414,3 +414,85 @@ function foo<T>(value: T) {
414414 }
415415}
416416
417+ // Repro from #23052
418+
419+ type A<T, V, E> =
420+ >A : Symbol(A, Decl(conditionalTypes2.ts, 119, 1))
421+ >T : Symbol(T, Decl(conditionalTypes2.ts, 123, 7))
422+ >V : Symbol(V, Decl(conditionalTypes2.ts, 123, 9))
423+ >E : Symbol(E, Decl(conditionalTypes2.ts, 123, 12))
424+
425+ T extends object
426+ >T : Symbol(T, Decl(conditionalTypes2.ts, 123, 7))
427+
428+ ? { [Q in { [P in keyof T]: T[P] extends V ? P : P; }[keyof T]]: A<T[Q], V, E>; }
429+ >Q : Symbol(Q, Decl(conditionalTypes2.ts, 125, 9))
430+ >P : Symbol(P, Decl(conditionalTypes2.ts, 125, 17))
431+ >T : Symbol(T, Decl(conditionalTypes2.ts, 123, 7))
432+ >T : Symbol(T, Decl(conditionalTypes2.ts, 123, 7))
433+ >P : Symbol(P, Decl(conditionalTypes2.ts, 125, 17))
434+ >V : Symbol(V, Decl(conditionalTypes2.ts, 123, 9))
435+ >P : Symbol(P, Decl(conditionalTypes2.ts, 125, 17))
436+ >P : Symbol(P, Decl(conditionalTypes2.ts, 125, 17))
437+ >T : Symbol(T, Decl(conditionalTypes2.ts, 123, 7))
438+ >A : Symbol(A, Decl(conditionalTypes2.ts, 119, 1))
439+ >T : Symbol(T, Decl(conditionalTypes2.ts, 123, 7))
440+ >Q : Symbol(Q, Decl(conditionalTypes2.ts, 125, 9))
441+ >V : Symbol(V, Decl(conditionalTypes2.ts, 123, 9))
442+ >E : Symbol(E, Decl(conditionalTypes2.ts, 123, 12))
443+
444+ : T extends V ? T : never;
445+ >T : Symbol(T, Decl(conditionalTypes2.ts, 123, 7))
446+ >V : Symbol(V, Decl(conditionalTypes2.ts, 123, 9))
447+ >T : Symbol(T, Decl(conditionalTypes2.ts, 123, 7))
448+
449+ type B<T, V> =
450+ >B : Symbol(B, Decl(conditionalTypes2.ts, 126, 30))
451+ >T : Symbol(T, Decl(conditionalTypes2.ts, 128, 7))
452+ >V : Symbol(V, Decl(conditionalTypes2.ts, 128, 9))
453+
454+ T extends object
455+ >T : Symbol(T, Decl(conditionalTypes2.ts, 128, 7))
456+
457+ ? { [Q in { [P in keyof T]: T[P] extends V ? P : P; }[keyof T]]: B<T[Q], V>; }
458+ >Q : Symbol(Q, Decl(conditionalTypes2.ts, 130, 9))
459+ >P : Symbol(P, Decl(conditionalTypes2.ts, 130, 17))
460+ >T : Symbol(T, Decl(conditionalTypes2.ts, 128, 7))
461+ >T : Symbol(T, Decl(conditionalTypes2.ts, 128, 7))
462+ >P : Symbol(P, Decl(conditionalTypes2.ts, 130, 17))
463+ >V : Symbol(V, Decl(conditionalTypes2.ts, 128, 9))
464+ >P : Symbol(P, Decl(conditionalTypes2.ts, 130, 17))
465+ >P : Symbol(P, Decl(conditionalTypes2.ts, 130, 17))
466+ >T : Symbol(T, Decl(conditionalTypes2.ts, 128, 7))
467+ >B : Symbol(B, Decl(conditionalTypes2.ts, 126, 30))
468+ >T : Symbol(T, Decl(conditionalTypes2.ts, 128, 7))
469+ >Q : Symbol(Q, Decl(conditionalTypes2.ts, 130, 9))
470+ >V : Symbol(V, Decl(conditionalTypes2.ts, 128, 9))
471+
472+ : T extends V ? T : never;
473+ >T : Symbol(T, Decl(conditionalTypes2.ts, 128, 7))
474+ >V : Symbol(V, Decl(conditionalTypes2.ts, 128, 9))
475+ >T : Symbol(T, Decl(conditionalTypes2.ts, 128, 7))
476+
477+ type C<T, V, E> =
478+ >C : Symbol(C, Decl(conditionalTypes2.ts, 131, 30))
479+ >T : Symbol(T, Decl(conditionalTypes2.ts, 133, 7))
480+ >V : Symbol(V, Decl(conditionalTypes2.ts, 133, 9))
481+ >E : Symbol(E, Decl(conditionalTypes2.ts, 133, 12))
482+
483+ { [Q in { [P in keyof T]: T[P] extends V ? P : P; }[keyof T]]: C<T[Q], V, E>; };
484+ >Q : Symbol(Q, Decl(conditionalTypes2.ts, 134, 5))
485+ >P : Symbol(P, Decl(conditionalTypes2.ts, 134, 13))
486+ >T : Symbol(T, Decl(conditionalTypes2.ts, 133, 7))
487+ >T : Symbol(T, Decl(conditionalTypes2.ts, 133, 7))
488+ >P : Symbol(P, Decl(conditionalTypes2.ts, 134, 13))
489+ >V : Symbol(V, Decl(conditionalTypes2.ts, 133, 9))
490+ >P : Symbol(P, Decl(conditionalTypes2.ts, 134, 13))
491+ >P : Symbol(P, Decl(conditionalTypes2.ts, 134, 13))
492+ >T : Symbol(T, Decl(conditionalTypes2.ts, 133, 7))
493+ >C : Symbol(C, Decl(conditionalTypes2.ts, 131, 30))
494+ >T : Symbol(T, Decl(conditionalTypes2.ts, 133, 7))
495+ >Q : Symbol(Q, Decl(conditionalTypes2.ts, 134, 5))
496+ >V : Symbol(V, Decl(conditionalTypes2.ts, 133, 9))
497+ >E : Symbol(E, Decl(conditionalTypes2.ts, 133, 12))
498+
0 commit comments