mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept new baselines
This commit is contained in:
@@ -1,19 +1,15 @@
|
||||
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"]'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(4,37): error TS2536: Type '"val"' cannot be used to index type 'B[Exclude<keyof B, K>]'.
|
||||
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; }'.
|
||||
Types of property 'main' are incompatible.
|
||||
Type 'Record<"val", "test">' is not assignable to type 'never'.
|
||||
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; }'.
|
||||
Types of property 'main' are incompatible.
|
||||
Type 'Record<"val", "test">' is not assignable to type 'never'.
|
||||
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; }'.
|
||||
Types of property 'main' are incompatible.
|
||||
Type 'Record<"val", "dup">' is not assignable to type 'never'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(27,37): error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(27,58): error TS2322: Type 'Record<"val", "test2">' is not assignable to type 'never'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(29,45): error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(31,43): error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(31,63): error TS2322: Type 'Record<"val", "dup">' is not assignable to type 'never'.
|
||||
tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' cannot be used to index type 'T[keyof T]'.
|
||||
|
||||
|
||||
!!! 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"]'.
|
||||
==== tests/cases/compiler/infiniteConstraints.ts (5 errors) ====
|
||||
==== tests/cases/compiler/infiniteConstraints.ts (7 errors) ====
|
||||
// Both of the following types trigger the recursion limiter in getImmediateBaseConstraint
|
||||
|
||||
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
|
||||
>(vals: T): void;
|
||||
|
||||
const noError = ensureNoDuplicates({main: value("test"), alternate: value("test2")});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ main: Record<"val", "test">; alternate: Record<"val", "test2">; }' is not assignable to parameter of type '{ main: never; alternate: never; }'.
|
||||
!!! error TS2345: Types of property 'main' are incompatible.
|
||||
!!! error TS2345: Type 'Record<"val", "test">' is not assignable to type 'never'.
|
||||
~~~~
|
||||
!!! error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'.
|
||||
!!! 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; }'
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type 'Record<"val", "test2">' is not assignable to type 'never'.
|
||||
!!! 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; }'
|
||||
|
||||
const shouldBeNoError = ensureNoDuplicates({main: value("test")});
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ main: Record<"val", "test">; }' is not assignable to parameter of type '{ main: never; }'.
|
||||
!!! error TS2345: Types of property 'main' are incompatible.
|
||||
!!! error TS2345: Type 'Record<"val", "test">' is not assignable to type 'never'.
|
||||
~~~~
|
||||
!!! error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'.
|
||||
!!! related TS6500 tests/cases/compiler/infiniteConstraints.ts:29:45: The expected type comes from property 'main' which is declared here on type '{ main: never; }'
|
||||
|
||||
const shouldBeError = ensureNoDuplicates({main: value("dup"), alternate: value("dup")});
|
||||
~~~~
|
||||
|
||||
Reference in New Issue
Block a user