From ea803620ecf3c76f012dda07ef7c13b6c8a6cf48 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 29 Oct 2019 13:56:25 -0700 Subject: [PATCH] Update comments in test --- .../baselines/reference/commonTypeIntersection.errors.txt | 4 ++-- tests/baselines/reference/commonTypeIntersection.js | 8 ++++---- tests/baselines/reference/commonTypeIntersection.symbols | 4 ++-- tests/baselines/reference/commonTypeIntersection.types | 4 ++-- .../types/intersection/commonTypeIntersection.ts | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/baselines/reference/commonTypeIntersection.errors.txt b/tests/baselines/reference/commonTypeIntersection.errors.txt index 6064a46a133..c10f8e2cfec 100644 --- a/tests/baselines/reference/commonTypeIntersection.errors.txt +++ b/tests/baselines/reference/commonTypeIntersection.errors.txt @@ -10,14 +10,14 @@ tests/cases/conformance/types/intersection/commonTypeIntersection.ts(4,5): error ==== tests/cases/conformance/types/intersection/commonTypeIntersection.ts (2 errors) ==== declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; - let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error! + let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here ~~ !!! error TS2322: Type '{ __typename?: "TypeTwo"; } & { a: boolean; }' is not assignable to type '{ __typename?: "TypeOne"; } & { a: boolean; }'. !!! error TS2322: Type '{ __typename?: "TypeTwo"; } & { a: boolean; }' is not assignable to type '{ __typename?: "TypeOne"; }'. !!! error TS2322: Types of property '__typename' are incompatible. !!! error TS2322: Type '"TypeTwo"' is not assignable to type '"TypeOne"'. declare let x2: { __typename?: 'TypeTwo' } & string; - let y2: { __typename?: 'TypeOne' } & string = x2; // No error! + let y2: { __typename?: 'TypeOne' } & string = x2; // should error here ~~ !!! error TS2322: Type '{ __typename?: "TypeTwo"; } & string' is not assignable to type '{ __typename?: "TypeOne"; } & string'. !!! error TS2322: Type '{ __typename?: "TypeTwo"; } & string' is not assignable to type '{ __typename?: "TypeOne"; }'. diff --git a/tests/baselines/reference/commonTypeIntersection.js b/tests/baselines/reference/commonTypeIntersection.js index 521a3738d3a..1bef2b3b06c 100644 --- a/tests/baselines/reference/commonTypeIntersection.js +++ b/tests/baselines/reference/commonTypeIntersection.js @@ -1,10 +1,10 @@ //// [commonTypeIntersection.ts] declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; -let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error! +let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here declare let x2: { __typename?: 'TypeTwo' } & string; -let y2: { __typename?: 'TypeOne' } & string = x2; // No error! +let y2: { __typename?: 'TypeOne' } & string = x2; // should error here //// [commonTypeIntersection.js] -var y1 = x1; // No error! -var y2 = x2; // No error! +var y1 = x1; // should error here +var y2 = x2; // should error here diff --git a/tests/baselines/reference/commonTypeIntersection.symbols b/tests/baselines/reference/commonTypeIntersection.symbols index 5753657bf62..3c81f5f4508 100644 --- a/tests/baselines/reference/commonTypeIntersection.symbols +++ b/tests/baselines/reference/commonTypeIntersection.symbols @@ -4,7 +4,7 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; >__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 0, 17)) >a : Symbol(a, Decl(commonTypeIntersection.ts, 0, 46)) -let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error! +let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here >y1 : Symbol(y1, Decl(commonTypeIntersection.ts, 1, 3)) >__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 1, 9)) >a : Symbol(a, Decl(commonTypeIntersection.ts, 1, 38)) @@ -14,7 +14,7 @@ declare let x2: { __typename?: 'TypeTwo' } & string; >x2 : Symbol(x2, Decl(commonTypeIntersection.ts, 2, 11)) >__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 2, 17)) -let y2: { __typename?: 'TypeOne' } & string = x2; // No error! +let y2: { __typename?: 'TypeOne' } & string = x2; // should error here >y2 : Symbol(y2, Decl(commonTypeIntersection.ts, 3, 3)) >__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 3, 9)) >x2 : Symbol(x2, Decl(commonTypeIntersection.ts, 2, 11)) diff --git a/tests/baselines/reference/commonTypeIntersection.types b/tests/baselines/reference/commonTypeIntersection.types index 2aa2349a777..aa14b244bb0 100644 --- a/tests/baselines/reference/commonTypeIntersection.types +++ b/tests/baselines/reference/commonTypeIntersection.types @@ -4,7 +4,7 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; >__typename : "TypeTwo" >a : boolean -let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error! +let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here >y1 : { __typename?: "TypeOne"; } & { a: boolean; } >__typename : "TypeOne" >a : boolean @@ -14,7 +14,7 @@ declare let x2: { __typename?: 'TypeTwo' } & string; >x2 : { __typename?: "TypeTwo"; } & string >__typename : "TypeTwo" -let y2: { __typename?: 'TypeOne' } & string = x2; // No error! +let y2: { __typename?: 'TypeOne' } & string = x2; // should error here >y2 : { __typename?: "TypeOne"; } & string >__typename : "TypeOne" >x2 : { __typename?: "TypeTwo"; } & string diff --git a/tests/cases/conformance/types/intersection/commonTypeIntersection.ts b/tests/cases/conformance/types/intersection/commonTypeIntersection.ts index e4fb2b9fbac..1b4ce3746bc 100644 --- a/tests/cases/conformance/types/intersection/commonTypeIntersection.ts +++ b/tests/cases/conformance/types/intersection/commonTypeIntersection.ts @@ -1,4 +1,4 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean }; -let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error! +let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here declare let x2: { __typename?: 'TypeTwo' } & string; -let y2: { __typename?: 'TypeOne' } & string = x2; // No error! +let y2: { __typename?: 'TypeOne' } & string = x2; // should error here