Skip to content

Commit ea80362

Browse files
committed
Update comments in test
1 parent 14d7a44 commit ea80362

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

tests/baselines/reference/commonTypeIntersection.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ tests/cases/conformance/types/intersection/commonTypeIntersection.ts(4,5): error
1010

1111
==== tests/cases/conformance/types/intersection/commonTypeIntersection.ts (2 errors) ====
1212
declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
13-
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
13+
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
1414
~~
1515
!!! error TS2322: Type '{ __typename?: "TypeTwo"; } & { a: boolean; }' is not assignable to type '{ __typename?: "TypeOne"; } & { a: boolean; }'.
1616
!!! error TS2322: Type '{ __typename?: "TypeTwo"; } & { a: boolean; }' is not assignable to type '{ __typename?: "TypeOne"; }'.
1717
!!! error TS2322: Types of property '__typename' are incompatible.
1818
!!! error TS2322: Type '"TypeTwo"' is not assignable to type '"TypeOne"'.
1919
declare let x2: { __typename?: 'TypeTwo' } & string;
20-
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
20+
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
2121
~~
2222
!!! error TS2322: Type '{ __typename?: "TypeTwo"; } & string' is not assignable to type '{ __typename?: "TypeOne"; } & string'.
2323
!!! error TS2322: Type '{ __typename?: "TypeTwo"; } & string' is not assignable to type '{ __typename?: "TypeOne"; }'.
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//// [commonTypeIntersection.ts]
22
declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
3-
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
3+
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
44
declare let x2: { __typename?: 'TypeTwo' } & string;
5-
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
5+
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
66

77

88
//// [commonTypeIntersection.js]
9-
var y1 = x1; // No error!
10-
var y2 = x2; // No error!
9+
var y1 = x1; // should error here
10+
var y2 = x2; // should error here

tests/baselines/reference/commonTypeIntersection.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
44
>__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 0, 17))
55
>a : Symbol(a, Decl(commonTypeIntersection.ts, 0, 46))
66

7-
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
7+
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
88
>y1 : Symbol(y1, Decl(commonTypeIntersection.ts, 1, 3))
99
>__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 1, 9))
1010
>a : Symbol(a, Decl(commonTypeIntersection.ts, 1, 38))
@@ -14,7 +14,7 @@ declare let x2: { __typename?: 'TypeTwo' } & string;
1414
>x2 : Symbol(x2, Decl(commonTypeIntersection.ts, 2, 11))
1515
>__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 2, 17))
1616

17-
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
17+
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
1818
>y2 : Symbol(y2, Decl(commonTypeIntersection.ts, 3, 3))
1919
>__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 3, 9))
2020
>x2 : Symbol(x2, Decl(commonTypeIntersection.ts, 2, 11))

tests/baselines/reference/commonTypeIntersection.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
44
>__typename : "TypeTwo"
55
>a : boolean
66

7-
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
7+
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
88
>y1 : { __typename?: "TypeOne"; } & { a: boolean; }
99
>__typename : "TypeOne"
1010
>a : boolean
@@ -14,7 +14,7 @@ declare let x2: { __typename?: 'TypeTwo' } & string;
1414
>x2 : { __typename?: "TypeTwo"; } & string
1515
>__typename : "TypeTwo"
1616

17-
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
17+
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
1818
>y2 : { __typename?: "TypeOne"; } & string
1919
>__typename : "TypeOne"
2020
>x2 : { __typename?: "TypeTwo"; } & string
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
2-
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
2+
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
33
declare let x2: { __typename?: 'TypeTwo' } & string;
4-
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
4+
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here

0 commit comments

Comments
 (0)