From 11d2712437c3a98ac0a4ddb913556dfb56678e1b Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 30 Dec 2020 11:33:39 -1000 Subject: [PATCH] Accept new baselines --- .../intersectionAndUnionTypes.errors.txt | 32 +++++++++---------- .../reference/intersectionAndUnionTypes.types | 26 +++++++-------- .../reference/unionTypeCallSignatures.types | 6 ++-- .../unionTypeConstructSignatures.types | 6 ++-- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/tests/baselines/reference/intersectionAndUnionTypes.errors.txt b/tests/baselines/reference/intersectionAndUnionTypes.errors.txt index 7de8735f640..e700e7c4721 100644 --- a/tests/baselines/reference/intersectionAndUnionTypes.errors.txt +++ b/tests/baselines/reference/intersectionAndUnionTypes.errors.txt @@ -22,24 +22,24 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(28,1): e tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(29,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C | D'. Type 'A & B' is not assignable to type 'C | D'. Property 'd' is missing in type 'A & B' but required in type 'D'. -tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(31,1): error TS2322: Type 'A & B' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. +tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(31,1): error TS2322: Type 'A & B' is not assignable to type '(A | B) & (C | D)'. Type 'A & B' is not assignable to type 'B & D'. Property 'd' is missing in type 'A & B' but required in type 'D'. -tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(32,1): error TS2322: Type 'A | B' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. - Type 'A' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. +tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(32,1): error TS2322: Type 'A | B' is not assignable to type '(A | B) & (C | D)'. + Type 'A' is not assignable to type '(A | B) & (C | D)'. Type 'A' is not assignable to type 'A & D'. Property 'd' is missing in type 'A' but required in type 'D'. -tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(33,1): error TS2322: Type 'C & D' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. +tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(33,1): error TS2322: Type 'C & D' is not assignable to type '(A | B) & (C | D)'. Type 'C & D' is not assignable to type 'B & D'. Property 'b' is missing in type 'C & D' but required in type 'B'. -tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(34,1): error TS2322: Type 'C | D' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. - Type 'C' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. +tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(34,1): error TS2322: Type 'C | D' is not assignable to type '(A | B) & (C | D)'. + Type 'C' is not assignable to type '(A | B) & (C | D)'. Type 'C' is not assignable to type 'B & C'. Property 'b' is missing in type 'C' but required in type 'B'. -tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(35,1): error TS2322: Type '(A & C) | (A & D) | (B & C) | (B & D)' is not assignable to type 'A & B'. +tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(35,1): error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A & B'. Type 'A & C' is not assignable to type 'A & B'. Property 'b' is missing in type 'A & C' but required in type 'B'. -tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): error TS2322: Type '(A & C) | (A & D) | (B & C) | (B & D)' is not assignable to type 'C & D'. +tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'C & D'. Type 'A & C' is not assignable to type 'C & D'. Property 'd' is missing in type 'A & C' but required in type 'D'. @@ -116,40 +116,40 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e y = anb; ~ -!!! error TS2322: Type 'A & B' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. +!!! error TS2322: Type 'A & B' is not assignable to type '(A | B) & (C | D)'. !!! error TS2322: Type 'A & B' is not assignable to type 'B & D'. !!! error TS2322: Property 'd' is missing in type 'A & B' but required in type 'D'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:15: 'd' is declared here. y = aob; ~ -!!! error TS2322: Type 'A | B' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. -!!! error TS2322: Type 'A' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. +!!! error TS2322: Type 'A | B' is not assignable to type '(A | B) & (C | D)'. +!!! error TS2322: Type 'A' is not assignable to type '(A | B) & (C | D)'. !!! error TS2322: Type 'A' is not assignable to type 'A & D'. !!! error TS2322: Property 'd' is missing in type 'A' but required in type 'D'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:15: 'd' is declared here. y = cnd; ~ -!!! error TS2322: Type 'C & D' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. +!!! error TS2322: Type 'C & D' is not assignable to type '(A | B) & (C | D)'. !!! error TS2322: Type 'C & D' is not assignable to type 'B & D'. !!! error TS2322: Property 'b' is missing in type 'C & D' but required in type 'B'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:15: 'b' is declared here. y = cod; ~ -!!! error TS2322: Type 'C | D' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. -!!! error TS2322: Type 'C' is not assignable to type '(A & C) | (A & D) | (B & C) | (B & D)'. +!!! error TS2322: Type 'C | D' is not assignable to type '(A | B) & (C | D)'. +!!! error TS2322: Type 'C' is not assignable to type '(A | B) & (C | D)'. !!! error TS2322: Type 'C' is not assignable to type 'B & C'. !!! error TS2322: Property 'b' is missing in type 'C' but required in type 'B'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:15: 'b' is declared here. anb = y; ~~~ -!!! error TS2322: Type '(A & C) | (A & D) | (B & C) | (B & D)' is not assignable to type 'A & B'. +!!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A & B'. !!! error TS2322: Type 'A & C' is not assignable to type 'A & B'. !!! error TS2322: Property 'b' is missing in type 'A & C' but required in type 'B'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:2:15: 'b' is declared here. aob = y; // Ok cnd = y; ~~~ -!!! error TS2322: Type '(A & C) | (A & D) | (B & C) | (B & D)' is not assignable to type 'C & D'. +!!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'C & D'. !!! error TS2322: Type 'A & C' is not assignable to type 'C & D'. !!! error TS2322: Property 'd' is missing in type 'A & C' but required in type 'D'. !!! related TS2728 tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts:4:15: 'd' is declared here. diff --git a/tests/baselines/reference/intersectionAndUnionTypes.types b/tests/baselines/reference/intersectionAndUnionTypes.types index bde88bd1c7b..0109cd1f789 100644 --- a/tests/baselines/reference/intersectionAndUnionTypes.types +++ b/tests/baselines/reference/intersectionAndUnionTypes.types @@ -39,7 +39,7 @@ var x: A & B | C & D; >x : (A & B) | (C & D) var y: (A | B) & (C | D); ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) a = anb; // Ok >a = anb : A & B @@ -103,41 +103,41 @@ cod = x; y = anb; >y = anb : A & B ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) >anb : A & B y = aob; >y = aob : A | B ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) >aob : A | B y = cnd; >y = cnd : C & D ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) >cnd : C & D y = cod; >y = cod : C | D ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) >cod : C | D anb = y; ->anb = y : (A & C) | (A & D) | (B & C) | (B & D) +>anb = y : (A | B) & (C | D) >anb : A & B ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) aob = y; // Ok ->aob = y : (A & C) | (A & D) | (B & C) | (B & D) +>aob = y : (A | B) & (C | D) >aob : A | B ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) cnd = y; ->cnd = y : (A & C) | (A & D) | (B & C) | (B & D) +>cnd = y : (A | B) & (C | D) >cnd : C & D ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) cod = y; // Ok ->cod = y : (A & C) | (A & D) | (B & C) | (B & D) +>cod = y : (A | B) & (C | D) >cod : C | D ->y : (A & C) | (A & D) | (B & C) | (B & D) +>y : (A | B) & (C | D) diff --git a/tests/baselines/reference/unionTypeCallSignatures.types b/tests/baselines/reference/unionTypeCallSignatures.types index 4e192bdf9bf..544f8b709dd 100644 --- a/tests/baselines/reference/unionTypeCallSignatures.types +++ b/tests/baselines/reference/unionTypeCallSignatures.types @@ -30,7 +30,7 @@ strOrBoolean = unionOfDifferentReturnType("hello"); // error >"hello" : "hello" unionOfDifferentReturnType1(true); // error in type of parameter ->unionOfDifferentReturnType1(true) : (Date & string) | (Date & false) | (Date & true) +>unionOfDifferentReturnType1(true) : (number | Date) & (string | boolean) >unionOfDifferentReturnType1 : { (a: number): number; (a: string): string; } | { (a: number): Date; (a: string): boolean; } >true : true @@ -56,12 +56,12 @@ strOrBoolean = unionOfDifferentReturnType1("hello"); >"hello" : "hello" unionOfDifferentReturnType1(true); // error in type of parameter ->unionOfDifferentReturnType1(true) : (Date & string) | (Date & false) | (Date & true) +>unionOfDifferentReturnType1(true) : (number | Date) & (string | boolean) >unionOfDifferentReturnType1 : { (a: number): number; (a: string): string; } | { (a: number): Date; (a: string): boolean; } >true : true unionOfDifferentReturnType1(); // error missing parameter ->unionOfDifferentReturnType1() : (Date & string) | (Date & false) | (Date & true) +>unionOfDifferentReturnType1() : (number | Date) & (string | boolean) >unionOfDifferentReturnType1 : { (a: number): number; (a: string): string; } | { (a: number): Date; (a: string): boolean; } var unionOfDifferentParameterTypes: { (a: number): number; } | { (a: string): Date; }; diff --git a/tests/baselines/reference/unionTypeConstructSignatures.types b/tests/baselines/reference/unionTypeConstructSignatures.types index 27e17975887..1bdea8ee81e 100644 --- a/tests/baselines/reference/unionTypeConstructSignatures.types +++ b/tests/baselines/reference/unionTypeConstructSignatures.types @@ -30,7 +30,7 @@ strOrBoolean = new unionOfDifferentReturnType("hello"); // error >"hello" : "hello" new unionOfDifferentReturnType1(true); // error in type of parameter ->new unionOfDifferentReturnType1(true) : (Date & string) | (Date & false) | (Date & true) +>new unionOfDifferentReturnType1(true) : (number | Date) & (string | boolean) >unionOfDifferentReturnType1 : { new (a: number): number; new (a: string): string; } | { new (a: number): Date; new (a: string): boolean; } >true : true @@ -56,12 +56,12 @@ strOrBoolean = new unionOfDifferentReturnType1("hello"); >"hello" : "hello" new unionOfDifferentReturnType1(true); // error in type of parameter ->new unionOfDifferentReturnType1(true) : (Date & string) | (Date & false) | (Date & true) +>new unionOfDifferentReturnType1(true) : (number | Date) & (string | boolean) >unionOfDifferentReturnType1 : { new (a: number): number; new (a: string): string; } | { new (a: number): Date; new (a: string): boolean; } >true : true new unionOfDifferentReturnType1(); // error missing parameter ->new unionOfDifferentReturnType1() : (Date & string) | (Date & false) | (Date & true) +>new unionOfDifferentReturnType1() : (number | Date) & (string | boolean) >unionOfDifferentReturnType1 : { new (a: number): number; new (a: string): string; } | { new (a: number): Date; new (a: string): boolean; } var unionOfDifferentParameterTypes: { new (a: number): number; } | { new (a: string): Date; };