@@ -498,3 +498,34 @@ type IfEquals<X, Y, A, B> = (<T>() => T extends X ? 1 : 2) extends <T>() => T ex
498
498
>A : Symbol(A, Decl(inferTypesWithExtends1.ts, 123, 19))
499
499
>B : Symbol(B, Decl(inferTypesWithExtends1.ts, 123, 22))
500
500
501
+ declare const x1: <T>() => (T extends infer U extends number ? 1 : 0);
502
+ >x1 : Symbol(x1, Decl(inferTypesWithExtends1.ts, 125, 13))
503
+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 125, 19))
504
+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 125, 19))
505
+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 125, 43))
506
+
507
+ function f1() {
508
+ >f1 : Symbol(f1, Decl(inferTypesWithExtends1.ts, 125, 70))
509
+
510
+ return x1;
511
+ >x1 : Symbol(x1, Decl(inferTypesWithExtends1.ts, 125, 13))
512
+ }
513
+
514
+ type ExpectNumber<T extends number> = T;
515
+ >ExpectNumber : Symbol(ExpectNumber, Decl(inferTypesWithExtends1.ts, 128, 1))
516
+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 130, 18))
517
+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 130, 18))
518
+
519
+ declare const x2: <T>() => (T extends ExpectNumber<infer U> ? 1 : 0);
520
+ >x2 : Symbol(x2, Decl(inferTypesWithExtends1.ts, 131, 13))
521
+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 131, 19))
522
+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 131, 19))
523
+ >ExpectNumber : Symbol(ExpectNumber, Decl(inferTypesWithExtends1.ts, 128, 1))
524
+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 131, 56))
525
+
526
+ function f2() {
527
+ >f2 : Symbol(f2, Decl(inferTypesWithExtends1.ts, 131, 69))
528
+
529
+ return x2;
530
+ >x2 : Symbol(x2, Decl(inferTypesWithExtends1.ts, 131, 13))
531
+ }
0 commit comments