@@ -388,3 +388,49 @@ function get123<K extends keyof Type>(): Type[K] {
388
388
return 123; // Error
389
389
}
390
390
391
+ // Repro from #30920
392
+
393
+ type StrictExtract<T, U> = T extends U ? U extends T ? T : never : never;
394
+ >StrictExtract : Symbol(StrictExtract, Decl(keyofAndIndexedAccess2.ts, 108, 1))
395
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 112, 19))
396
+ >U : Symbol(U, Decl(keyofAndIndexedAccess2.ts, 112, 21))
397
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 112, 19))
398
+ >U : Symbol(U, Decl(keyofAndIndexedAccess2.ts, 112, 21))
399
+ >U : Symbol(U, Decl(keyofAndIndexedAccess2.ts, 112, 21))
400
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 112, 19))
401
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 112, 19))
402
+
403
+ type StrictExclude<T, U> = T extends StrictExtract<T, U> ? never : T;
404
+ >StrictExclude : Symbol(StrictExclude, Decl(keyofAndIndexedAccess2.ts, 112, 73))
405
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 113, 19))
406
+ >U : Symbol(U, Decl(keyofAndIndexedAccess2.ts, 113, 21))
407
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 113, 19))
408
+ >StrictExtract : Symbol(StrictExtract, Decl(keyofAndIndexedAccess2.ts, 108, 1))
409
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 113, 19))
410
+ >U : Symbol(U, Decl(keyofAndIndexedAccess2.ts, 113, 21))
411
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 113, 19))
412
+
413
+ type A<T> = { [Q in { [P in keyof T]: P; }[keyof T]]: T[Q]; };
414
+ >A : Symbol(A, Decl(keyofAndIndexedAccess2.ts, 113, 69))
415
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 114, 7))
416
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 114, 15))
417
+ >P : Symbol(P, Decl(keyofAndIndexedAccess2.ts, 114, 23))
418
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 114, 7))
419
+ >P : Symbol(P, Decl(keyofAndIndexedAccess2.ts, 114, 23))
420
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 114, 7))
421
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 114, 7))
422
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 114, 15))
423
+
424
+ type B<T, V> = A<{ [Q in keyof T]: StrictExclude<B<T[Q], V>, {}>; }>;
425
+ >B : Symbol(B, Decl(keyofAndIndexedAccess2.ts, 114, 62))
426
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 115, 7))
427
+ >V : Symbol(V, Decl(keyofAndIndexedAccess2.ts, 115, 9))
428
+ >A : Symbol(A, Decl(keyofAndIndexedAccess2.ts, 113, 69))
429
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 115, 20))
430
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 115, 7))
431
+ >StrictExclude : Symbol(StrictExclude, Decl(keyofAndIndexedAccess2.ts, 112, 73))
432
+ >B : Symbol(B, Decl(keyofAndIndexedAccess2.ts, 114, 62))
433
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 115, 7))
434
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 115, 20))
435
+ >V : Symbol(V, Decl(keyofAndIndexedAccess2.ts, 115, 9))
436
+
0 commit comments