From cfb5634de160f85e517693f2f5742b752b3c8c91 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 23 Feb 2016 13:34:26 -0800 Subject: [PATCH] Accepted baselines. --- ...rrorMessagesIntersectionTypes01.errors.txt | 8 ++-- ...rrorMessagesIntersectionTypes02.errors.txt | 10 +++-- .../intersectionAndUnionTypes.errors.txt | 44 +++++-------------- .../recursiveIntersectionTypes.errors.txt | 6 +-- 4 files changed, 24 insertions(+), 44 deletions(-) diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes01.errors.txt b/tests/baselines/reference/errorMessagesIntersectionTypes01.errors.txt index 5ea490fb0db..6b36f29a63e 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes01.errors.txt +++ b/tests/baselines/reference/errorMessagesIntersectionTypes01.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/errorMessagesIntersectionTypes01.ts(14,5): error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'. - Type 'Bar' is not assignable to type 'FooBar'. - Property 'fooProp' is missing in type 'Bar'. + Types of property 'fooProp' are incompatible. + Type 'string' is not assignable to type 'boolean'. ==== tests/cases/compiler/errorMessagesIntersectionTypes01.ts (1 errors) ==== @@ -20,7 +20,7 @@ tests/cases/compiler/errorMessagesIntersectionTypes01.ts(14,5): error TS2322: Ty let fooBar: FooBar = mixBar({ ~~~~~~ !!! error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'. -!!! error TS2322: Type 'Bar' is not assignable to type 'FooBar'. -!!! error TS2322: Property 'fooProp' is missing in type 'Bar'. +!!! error TS2322: Types of property 'fooProp' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. fooProp: "frizzlebizzle" }); \ No newline at end of file diff --git a/tests/baselines/reference/errorMessagesIntersectionTypes02.errors.txt b/tests/baselines/reference/errorMessagesIntersectionTypes02.errors.txt index 3c6da0b99a0..06e06c87015 100644 --- a/tests/baselines/reference/errorMessagesIntersectionTypes02.errors.txt +++ b/tests/baselines/reference/errorMessagesIntersectionTypes02.errors.txt @@ -1,6 +1,7 @@ tests/cases/compiler/errorMessagesIntersectionTypes02.ts(14,5): error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'. - Type 'Bar' is not assignable to type 'FooBar'. - Property 'fooProp' is missing in type 'Bar'. + Types of property 'fooProp' are incompatible. + Type 'string' is not assignable to type '"hello" | "world"'. + Type 'string' is not assignable to type '"world"'. ==== tests/cases/compiler/errorMessagesIntersectionTypes02.ts (1 errors) ==== @@ -20,7 +21,8 @@ tests/cases/compiler/errorMessagesIntersectionTypes02.ts(14,5): error TS2322: Ty let fooBar: FooBar = mixBar({ ~~~~~~ !!! error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'. -!!! error TS2322: Type 'Bar' is not assignable to type 'FooBar'. -!!! error TS2322: Property 'fooProp' is missing in type 'Bar'. +!!! error TS2322: Types of property 'fooProp' are incompatible. +!!! error TS2322: Type 'string' is not assignable to type '"hello" | "world"'. +!!! error TS2322: Type 'string' is not assignable to type '"world"'. fooProp: "frizzlebizzle" }); \ No newline at end of file diff --git a/tests/baselines/reference/intersectionAndUnionTypes.errors.txt b/tests/baselines/reference/intersectionAndUnionTypes.errors.txt index d4526c815c4..5a04d4f25d3 100644 --- a/tests/baselines/reference/intersectionAndUnionTypes.errors.txt +++ b/tests/baselines/reference/intersectionAndUnionTypes.errors.txt @@ -17,27 +17,22 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(25,1): e tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(26,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A & B'. Type 'C & D' is not assignable to type 'A & B'. Type 'C & D' is not assignable to type 'A'. - Type 'D' is not assignable to type 'A'. - Property 'a' is missing in type 'D'. + Property 'a' is missing in type 'C & D'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(27,1): error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A | B'. Type 'C & D' is not assignable to type 'A | B'. Type 'C & D' is not assignable to type 'B'. - Type 'D' is not assignable to type 'B'. - Property 'b' is missing in type 'D'. + Property 'b' is missing in type 'C & D'. tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(28,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'. Type 'A & B' is not assignable to type 'C'. - Type 'B' is not assignable to type 'C'. - Property 'c' is missing in type 'B'. + Property 'c' is missing in type 'A & B'. 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'. Type 'A & B' is not assignable to type 'D'. - Type 'B' is not assignable to type 'D'. - Property 'd' is missing in type 'B'. + Property 'd' is missing in type 'A & B'. 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 'C | D'. Type 'A & B' is not assignable to type 'D'. - Type 'B' is not assignable to type '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 'C | D'. @@ -46,7 +41,6 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(32,1): e 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 'A | B'. Type 'C & D' is not assignable to type 'B'. - Type 'D' is not assignable to type 'B'. 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 'A | B'. @@ -54,14 +48,10 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(34,1): e Property 'b' is missing in type 'C'. 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 | B) & (C | D)' is not assignable to type 'A'. - Type 'C | D' is not assignable to type 'A'. - Type 'C' is not assignable to type 'A'. - Property 'a' is missing in type 'C'. + Property 'a' is missing in type '(A | B) & (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 | B) & (C | D)' is not assignable to type 'C'. - Type 'C | D' is not assignable to type 'C'. - Type 'D' is not assignable to type 'C'. - Property 'c' is missing in type 'D'. + Property 'c' is missing in type '(A | B) & (C | D)'. ==== tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts (14 errors) ==== @@ -115,36 +105,31 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e !!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A & B'. !!! error TS2322: Type 'C & D' is not assignable to type 'A & B'. !!! error TS2322: Type 'C & D' is not assignable to type 'A'. -!!! error TS2322: Type 'D' is not assignable to type 'A'. -!!! error TS2322: Property 'a' is missing in type 'D'. +!!! error TS2322: Property 'a' is missing in type 'C & D'. aob = x; ~~~ !!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'A | B'. !!! error TS2322: Type 'C & D' is not assignable to type 'A | B'. !!! error TS2322: Type 'C & D' is not assignable to type 'B'. -!!! error TS2322: Type 'D' is not assignable to type 'B'. -!!! error TS2322: Property 'b' is missing in type 'D'. +!!! error TS2322: Property 'b' is missing in type 'C & D'. cnd = x; ~~~ !!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C & D'. !!! error TS2322: Type 'A & B' is not assignable to type 'C & D'. !!! error TS2322: Type 'A & B' is not assignable to type 'C'. -!!! error TS2322: Type 'B' is not assignable to type 'C'. -!!! error TS2322: Property 'c' is missing in type 'B'. +!!! error TS2322: Property 'c' is missing in type 'A & B'. cod = x; ~~~ !!! error TS2322: Type '(A & B) | (C & D)' is not assignable to type 'C | D'. !!! error TS2322: Type 'A & B' is not assignable to type 'C | D'. !!! error TS2322: Type 'A & B' is not assignable to type 'D'. -!!! error TS2322: Type 'B' is not assignable to type 'D'. -!!! error TS2322: Property 'd' is missing in type 'B'. +!!! error TS2322: Property 'd' is missing in type 'A & B'. y = anb; ~ !!! error TS2322: Type 'A & B' is not assignable to type '(A | B) & (C | D)'. !!! error TS2322: Type 'A & B' is not assignable to type 'C | D'. !!! error TS2322: Type 'A & B' is not assignable to type 'D'. -!!! error TS2322: Type 'B' is not assignable to type 'D'. y = aob; ~ !!! error TS2322: Type 'A | B' is not assignable to type '(A | B) & (C | D)'. @@ -157,7 +142,6 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e !!! error TS2322: Type 'C & D' is not assignable to type '(A | B) & (C | D)'. !!! error TS2322: Type 'C & D' is not assignable to type 'A | B'. !!! error TS2322: Type 'C & D' is not assignable to type 'B'. -!!! error TS2322: Type 'D' is not assignable to type 'B'. y = cod; ~ !!! error TS2322: Type 'C | D' is not assignable to type '(A | B) & (C | D)'. @@ -169,16 +153,12 @@ tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts(37,1): e ~~~ !!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A & B'. !!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'A'. -!!! error TS2322: Type 'C | D' is not assignable to type 'A'. -!!! error TS2322: Type 'C' is not assignable to type 'A'. -!!! error TS2322: Property 'a' is missing in type 'C'. +!!! error TS2322: Property 'a' is missing in type '(A | B) & (C | D)'. aob = y; // Ok cnd = y; ~~~ !!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'C & D'. !!! error TS2322: Type '(A | B) & (C | D)' is not assignable to type 'C'. -!!! error TS2322: Type 'C | D' is not assignable to type 'C'. -!!! error TS2322: Type 'D' is not assignable to type 'C'. -!!! error TS2322: Property 'c' is missing in type 'D'. +!!! error TS2322: Property 'c' is missing in type '(A | B) & (C | D)'. cod = y; // Ok \ No newline at end of file diff --git a/tests/baselines/reference/recursiveIntersectionTypes.errors.txt b/tests/baselines/reference/recursiveIntersectionTypes.errors.txt index bac97470e55..34a25c19712 100644 --- a/tests/baselines/reference/recursiveIntersectionTypes.errors.txt +++ b/tests/baselines/reference/recursiveIntersectionTypes.errors.txt @@ -1,7 +1,6 @@ tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts(19,1): error TS2322: Type 'Entity & { next: Entity & any; }' is not assignable to type 'Product & { next: Product & any; }'. Type 'Entity & { next: Entity & any; }' is not assignable to type 'Product'. - Type '{ next: Entity & any; }' is not assignable to type 'Product'. - Property 'price' is missing in type '{ next: Entity & any; }'. + Property 'price' is missing in type 'Entity & { next: Entity & any; }'. ==== tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts (1 errors) ==== @@ -27,6 +26,5 @@ tests/cases/conformance/types/intersection/recursiveIntersectionTypes.ts(19,1): ~~~~~~~~~~~ !!! error TS2322: Type 'Entity & { next: Entity & any; }' is not assignable to type 'Product & { next: Product & any; }'. !!! error TS2322: Type 'Entity & { next: Entity & any; }' is not assignable to type 'Product'. -!!! error TS2322: Type '{ next: Entity & any; }' is not assignable to type 'Product'. -!!! error TS2322: Property 'price' is missing in type '{ next: Entity & any; }'. +!!! error TS2322: Property 'price' is missing in type 'Entity & { next: Entity & any; }'. \ No newline at end of file