|
| 1 | +tests/cases/compiler/infiniteConstraints.ts(3,37): error TS2589: Type instantiation is excessively deep and possibly infinite. |
1 | 2 | tests/cases/compiler/infiniteConstraints.ts(4,37): error TS2536: Type '"val"' cannot be used to index type 'B[Exclude<keyof B, K>]'.
|
2 | 3 | tests/cases/compiler/infiniteConstraints.ts(31,43): error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'.
|
3 | 4 | tests/cases/compiler/infiniteConstraints.ts(31,63): error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'.
|
4 | 5 | tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' cannot be used to index type 'T[keyof T]'.
|
| 6 | +tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2589: Type instantiation is excessively deep and possibly infinite. |
5 | 7 |
|
6 | 8 |
|
7 |
| -==== tests/cases/compiler/infiniteConstraints.ts (4 errors) ==== |
| 9 | +==== tests/cases/compiler/infiniteConstraints.ts (6 errors) ==== |
8 | 10 | // Both of the following types trigger the recursion limiter in getImmediateBaseConstraint
|
9 | 11 |
|
10 | 12 | type T1<B extends { [K in keyof B]: Extract<B[Exclude<keyof B, K>], { val: string }>["val"] }> = B;
|
| 13 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 14 | +!!! error TS2589: Type instantiation is excessively deep and possibly infinite. |
11 | 15 | type T2<B extends { [K in keyof B]: B[Exclude<keyof B, K>]["val"] }> = B;
|
12 | 16 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
13 | 17 | !!! error TS2536: Type '"val"' cannot be used to index type 'B[Exclude<keyof B, K>]'.
|
@@ -51,4 +55,6 @@ tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' c
|
51 | 55 | declare function function1<T extends {[K in keyof T]: Cond<T[K]>}>(): T[keyof T]["foo"];
|
52 | 56 | ~~~~~~~~~~~~~~~~~
|
53 | 57 | !!! error TS2536: Type '"foo"' cannot be used to index type 'T[keyof T]'.
|
| 58 | + ~~~~~~~~~~~~~~~~~ |
| 59 | +!!! error TS2589: Type instantiation is excessively deep and possibly infinite. |
54 | 60 |
|
0 commit comments