Skip to content

Commit f597e2e

Browse files
committed
Accept new baselines
1 parent 61b0e1d commit f597e2e

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

tests/baselines/reference/infiniteConstraints.errors.txt

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
error TS2321: Excessive stack depth comparing types 'Extract<T[Exclude<keyof T, string | number | symbol>], Record<"val", string>>["val"]' and 'Extract<T[Exclude<keyof T, Exclude<keyof T, string | number | symbol>>], Record<"val", string>>["val"]'.
22
tests/cases/compiler/infiniteConstraints.ts(4,37): error TS2536: Type '"val"' cannot be used to index type 'B[Exclude<keyof B, K>]'.
3-
tests/cases/compiler/infiniteConstraints.ts(27,36): error TS2345: Argument of type '{ main: Record<"val", "test">; alternate: Record<"val", "test2">; }' is not assignable to parameter of type '{ main: never; alternate: never; }'.
4-
Types of property 'main' are incompatible.
5-
Type 'Record<"val", "test">' is not assignable to type 'never'.
6-
tests/cases/compiler/infiniteConstraints.ts(29,44): error TS2345: Argument of type '{ main: Record<"val", "test">; }' is not assignable to parameter of type '{ main: never; }'.
7-
Types of property 'main' are incompatible.
8-
Type 'Record<"val", "test">' is not assignable to type 'never'.
9-
tests/cases/compiler/infiniteConstraints.ts(31,42): error TS2345: Argument of type '{ main: Record<"val", "dup">; alternate: Record<"val", "dup">; }' is not assignable to parameter of type '{ main: never; alternate: never; }'.
10-
Types of property 'main' are incompatible.
11-
Type 'Record<"val", "dup">' is not assignable to type 'never'.
3+
tests/cases/compiler/infiniteConstraints.ts(27,37): error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'.
4+
tests/cases/compiler/infiniteConstraints.ts(27,58): error TS2322: Type 'Record<"val", "test2">' is not assignable to type 'never'.
5+
tests/cases/compiler/infiniteConstraints.ts(29,45): error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'.
6+
tests/cases/compiler/infiniteConstraints.ts(31,43): error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'.
7+
tests/cases/compiler/infiniteConstraints.ts(31,63): error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'.
128
tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' cannot be used to index type 'T[keyof T]'.
139

1410

1511
!!! error TS2321: Excessive stack depth comparing types 'Extract<T[Exclude<keyof T, string | number | symbol>], Record<"val", string>>["val"]' and 'Extract<T[Exclude<keyof T, Exclude<keyof T, string | number | symbol>>], Record<"val", string>>["val"]'.
16-
==== tests/cases/compiler/infiniteConstraints.ts (5 errors) ====
12+
==== tests/cases/compiler/infiniteConstraints.ts (7 errors) ====
1713
// Both of the following types trigger the recursion limiter in getImmediateBaseConstraint
1814

1915
type T1<B extends { [K in keyof B]: Extract<B[Exclude<keyof B, K>], { val: string }>["val"] }> = B;
@@ -43,16 +39,17 @@ tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' c
4339
>(vals: T): void;
4440

4541
const noError = ensureNoDuplicates({main: value("test"), alternate: value("test2")});
46-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47-
!!! error TS2345: Argument of type '{ main: Record<"val", "test">; alternate: Record<"val", "test2">; }' is not assignable to parameter of type '{ main: never; alternate: never; }'.
48-
!!! error TS2345: Types of property 'main' are incompatible.
49-
!!! error TS2345: Type 'Record<"val", "test">' is not assignable to type 'never'.
42+
~~~~
43+
!!! error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'.
44+
!!! related TS6500 tests/cases/compiler/infiniteConstraints.ts:27:37: The expected type comes from property 'main' which is declared here on type '{ main: never; alternate: never; }'
45+
~~~~~~~~~
46+
!!! error TS2322: Type 'Record<"val", "test2">' is not assignable to type 'never'.
47+
!!! related TS6500 tests/cases/compiler/infiniteConstraints.ts:27:58: The expected type comes from property 'alternate' which is declared here on type '{ main: never; alternate: never; }'
5048

5149
const shouldBeNoError = ensureNoDuplicates({main: value("test")});
52-
~~~~~~~~~~~~~~~~~~~~~
53-
!!! error TS2345: Argument of type '{ main: Record<"val", "test">; }' is not assignable to parameter of type '{ main: never; }'.
54-
!!! error TS2345: Types of property 'main' are incompatible.
55-
!!! error TS2345: Type 'Record<"val", "test">' is not assignable to type 'never'.
50+
~~~~
51+
!!! error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'.
52+
!!! related TS6500 tests/cases/compiler/infiniteConstraints.ts:29:45: The expected type comes from property 'main' which is declared here on type '{ main: never; }'
5653

5754
const shouldBeError = ensureNoDuplicates({main: value("dup"), alternate: value("dup")});
5855
~~~~

0 commit comments

Comments
 (0)