From d6697714629b3c204fdbadca1452480b436bd09c Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 30 Oct 2017 12:36:34 -0700 Subject: [PATCH] Accept new baselines --- .../narrowingGenericTypeFromInstanceof01.errors.txt | 10 ++++------ .../narrowingGenericTypeFromInstanceof01.types | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt index c686cd7a7cf..bb35b351c1b 100644 --- a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt +++ b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.errors.txt @@ -1,6 +1,5 @@ -tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts(13,17): error TS2345: Argument of type 'A | B' is not assignable to parameter of type 'A'. - Type 'B' is not assignable to type 'A'. - Property 'a' is missing in type 'B'. +tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts(13,17): error TS2345: Argument of type 'B' is not assignable to parameter of type 'A<{}>'. + Property 'a' is missing in type 'B'. ==== tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts (1 errors) ==== @@ -18,9 +17,8 @@ tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeF if (x instanceof B) { acceptA(x); ~ -!!! error TS2345: Argument of type 'A | B' is not assignable to parameter of type 'A'. -!!! error TS2345: Type 'B' is not assignable to type 'A'. -!!! error TS2345: Property 'a' is missing in type 'B'. +!!! error TS2345: Argument of type 'B' is not assignable to parameter of type 'A<{}>'. +!!! error TS2345: Property 'a' is missing in type 'B'. } if (x instanceof A) { diff --git a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types index 22d02d17ce1..964c7920a34 100644 --- a/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types +++ b/tests/baselines/reference/narrowingGenericTypeFromInstanceof01.types @@ -43,7 +43,7 @@ function test(x: A | B) { acceptA(x); >acceptA(x) : any >acceptA : (a: A) => void ->x : A | B +>x : B } if (x instanceof A) { @@ -65,7 +65,7 @@ function test(x: A | B) { acceptB(x); >acceptB(x) : void >acceptB : (b: B) => void ->x : A | B +>x : B } if (x instanceof B) { @@ -76,6 +76,6 @@ function test(x: A | B) { acceptB(x); >acceptB(x) : void >acceptB : (b: B) => void ->x : A | B +>x : B } }