From f597e2e40929a3f5505367a8e9180aa20250d579 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 30 Aug 2018 17:33:57 -0700 Subject: [PATCH] Accept new baselines --- .../reference/infiniteConstraints.errors.txt | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/tests/baselines/reference/infiniteConstraints.errors.txt b/tests/baselines/reference/infiniteConstraints.errors.txt index cc420675872..71034e87edf 100644 --- a/tests/baselines/reference/infiniteConstraints.errors.txt +++ b/tests/baselines/reference/infiniteConstraints.errors.txt @@ -1,19 +1,15 @@ error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. tests/cases/compiler/infiniteConstraints.ts(4,37): error TS2536: Type '"val"' cannot be used to index type 'B[Exclude]'. -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], Record<"val", string>>["val"]' and 'Extract>], 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], { 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")}); ~~~~