Skip to content

Commit 50a37ce

Browse files
committed
Accept new baselines
1 parent a504022 commit 50a37ce

7 files changed

+83
-78
lines changed

tests/baselines/reference/enumAssignmentCompat3.errors.txt

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
tests/cases/compiler/enumAssignmentCompat3.ts(68,1): error TS2324: Property 'd' is missing in type 'First.E'.
1+
tests/cases/compiler/enumAssignmentCompat3.ts(68,1): error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'.
2+
Property 'd' is missing in type 'First.E'.
23
tests/cases/compiler/enumAssignmentCompat3.ts(70,1): error TS2322: Type 'Cd.E' is not assignable to type 'First.E'.
34
Property 'd' is missing in type 'First.E'.
45
tests/cases/compiler/enumAssignmentCompat3.ts(71,1): error TS2322: Type 'Nope' is not assignable to type 'E'.
56
tests/cases/compiler/enumAssignmentCompat3.ts(72,1): error TS2322: Type 'Decl.E' is not assignable to type 'First.E'.
6-
tests/cases/compiler/enumAssignmentCompat3.ts(75,1): error TS2324: Property 'c' is missing in type 'Ab.E'.
7+
tests/cases/compiler/enumAssignmentCompat3.ts(75,1): error TS2322: Type 'First.E' is not assignable to type 'Ab.E'.
8+
Property 'c' is missing in type 'Ab.E'.
79
tests/cases/compiler/enumAssignmentCompat3.ts(76,1): error TS2322: Type 'First.E' is not assignable to type 'Cd.E'.
10+
Property 'a' is missing in type 'Cd.E'.
811
tests/cases/compiler/enumAssignmentCompat3.ts(77,1): error TS2322: Type 'E' is not assignable to type 'Nope'.
912
tests/cases/compiler/enumAssignmentCompat3.ts(78,1): error TS2322: Type 'First.E' is not assignable to type 'Decl.E'.
1013
tests/cases/compiler/enumAssignmentCompat3.ts(82,1): error TS2322: Type 'Const.E' is not assignable to type 'First.E'.
1114
tests/cases/compiler/enumAssignmentCompat3.ts(83,1): error TS2322: Type 'First.E' is not assignable to type 'Const.E'.
12-
tests/cases/compiler/enumAssignmentCompat3.ts(86,1): error TS2324: Property 'd' is missing in type 'First.E'.
15+
tests/cases/compiler/enumAssignmentCompat3.ts(86,1): error TS2322: Type 'Merged.E' is not assignable to type 'First.E'.
16+
Property 'd' is missing in type 'First.E'.
1317

1418

1519
==== tests/cases/compiler/enumAssignmentCompat3.ts (11 errors) ====
@@ -82,7 +86,8 @@ tests/cases/compiler/enumAssignmentCompat3.ts(86,1): error TS2324: Property 'd'
8286
abc = secondAbc; // ok
8387
abc = secondAbcd; // missing 'd'
8488
~~~
85-
!!! error TS2324: Property 'd' is missing in type 'First.E'.
89+
!!! error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'.
90+
!!! error TS2322: Property 'd' is missing in type 'First.E'.
8691
abc = secondAb; // ok
8792
abc = secondCd; // missing 'd'
8893
~~~
@@ -98,10 +103,12 @@ tests/cases/compiler/enumAssignmentCompat3.ts(86,1): error TS2324: Property 'd'
98103
secondAbcd = abc; // ok
99104
secondAb = abc; // missing 'c'
100105
~~~~~~~~
101-
!!! error TS2324: Property 'c' is missing in type 'Ab.E'.
106+
!!! error TS2322: Type 'First.E' is not assignable to type 'Ab.E'.
107+
!!! error TS2322: Property 'c' is missing in type 'Ab.E'.
102108
secondCd = abc; // missing 'a' and 'b'
103109
~~~~~~~~
104110
!!! error TS2322: Type 'First.E' is not assignable to type 'Cd.E'.
111+
!!! error TS2322: Property 'a' is missing in type 'Cd.E'.
105112
nope = abc; // nope!
106113
~~~~
107114
!!! error TS2322: Type 'E' is not assignable to type 'Nope'.
@@ -121,7 +128,8 @@ tests/cases/compiler/enumAssignmentCompat3.ts(86,1): error TS2324: Property 'd'
121128
// merged enums compare all their members
122129
abc = merged; // missing 'd'
123130
~~~
124-
!!! error TS2324: Property 'd' is missing in type 'First.E'.
131+
!!! error TS2322: Type 'Merged.E' is not assignable to type 'First.E'.
132+
!!! error TS2322: Property 'd' is missing in type 'First.E'.
125133
merged = abc; // ok
126134
abc = merged2; // ok
127135
merged2 = abc; // ok

tests/baselines/reference/literalTypes2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function f3() {
290290
>c2 : 1 | "two"
291291

292292
let x3 = c3;
293-
>x3 : number | boolean | E
293+
>x3 : number | boolean
294294
>c3 : true | E.A | 123
295295

296296
let x4 = c4;

tests/baselines/reference/logicalAndOperatorWithEveryType.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ var rf5 = a5 && a6;
365365

366366
var rf6 = a6 && a6;
367367
>rf6 : E
368-
>a6 && a6 : E.b | E.c
368+
>a6 && a6 : E
369369
>a6 : E
370370
>a6 : E.b | E.c
371371

tests/baselines/reference/logicalOrOperatorWithEveryType.types

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ var rb5 = a5 || a2; // void || boolean is void | boolean
128128

129129
var rb6 = a6 || a2; // enum || boolean is E | boolean
130130
>rb6 : boolean | E
131-
>a6 || a2 : boolean | E
131+
>a6 || a2 : boolean | E.b | E.c
132132
>a6 : E
133133
>a2 : boolean
134134

@@ -248,7 +248,7 @@ var rd5 = a5 || a4; // void || string is void | string
248248

249249
var rd6 = a6 || a4; // enum || string is enum | string
250250
>rd6 : string | E
251-
>a6 || a4 : string | E
251+
>a6 || a4 : string | E.b | E.c
252252
>a6 : E
253253
>a4 : string
254254

@@ -308,7 +308,7 @@ var re5 = a5 || a5; // void || void is void
308308

309309
var re6 = a6 || a5; // enum || void is enum | void
310310
>re6 : void | E
311-
>a6 || a5 : void | E
311+
>a6 || a5 : void | E.b | E.c
312312
>a6 : E
313313
>a5 : void
314314

@@ -428,7 +428,7 @@ var rh5 = a5 || a7; // void || object is void | object
428428

429429
var rh6 = a6 || a7; // enum || object is enum | object
430430
>rh6 : E | { a: string; }
431-
>a6 || a7 : E | { a: string; }
431+
>a6 || a7 : E.b | E.c | { a: string; }
432432
>a6 : E
433433
>a7 : { a: string; }
434434

@@ -488,7 +488,7 @@ var ri5 = a5 || a8; // void || array is void | array
488488

489489
var ri6 = a6 || a8; // enum || array is enum | array
490490
>ri6 : E | string[]
491-
>a6 || a8 : E | string[]
491+
>a6 || a8 : E.b | E.c | string[]
492492
>a6 : E
493493
>a8 : string[]
494494

@@ -548,7 +548,7 @@ var rj5 = a5 || null; // void || null is void
548548

549549
var rj6 = a6 || null; // enum || null is E
550550
>rj6 : E
551-
>a6 || null : E
551+
>a6 || null : E.b | E.c
552552
>a6 : E
553553
>null : null
554554

@@ -608,7 +608,7 @@ var rf5 = a5 || undefined; // void || undefined is void
608608

609609
var rf6 = a6 || undefined; // enum || undefined is E
610610
>rf6 : E
611-
>a6 || undefined : E
611+
>a6 || undefined : E.b | E.c
612612
>a6 : E
613613
>undefined : undefined
614614

tests/baselines/reference/metadataOfUnion.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ class D {
8181
>PropDeco : (target: Object, propKey: string | symbol) => void
8282

8383
d: E | number;
84-
>d : number | E
84+
>d : number
8585
>E : E
8686
}

tests/baselines/reference/subtypesOfUnion.errors.txt

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf
1212
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(28,5): error TS2411: Property 'foo16' of type 'T' is not assignable to string index type 'string | number'.
1313
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(29,5): error TS2411: Property 'foo17' of type 'Object' is not assignable to string index type 'string | number'.
1414
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(30,5): error TS2411: Property 'foo18' of type '{}' is not assignable to string index type 'string | number'.
15-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(35,5): error TS2411: Property 'foo2' of type 'string' is not assignable to string index type 'number | E'.
16-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(37,5): error TS2411: Property 'foo4' of type 'boolean' is not assignable to string index type 'number | E'.
17-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(39,5): error TS2411: Property 'foo6' of type 'Date' is not assignable to string index type 'number | E'.
18-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(40,5): error TS2411: Property 'foo7' of type 'RegExp' is not assignable to string index type 'number | E'.
19-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(41,5): error TS2411: Property 'foo8' of type '{ bar: number; }' is not assignable to string index type 'number | E'.
20-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(42,5): error TS2411: Property 'foo9' of type 'I8' is not assignable to string index type 'number | E'.
21-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(43,5): error TS2411: Property 'foo10' of type 'A' is not assignable to string index type 'number | E'.
22-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(44,5): error TS2411: Property 'foo11' of type 'A2<number>' is not assignable to string index type 'number | E'.
23-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(45,5): error TS2411: Property 'foo12' of type '(x: any) => number' is not assignable to string index type 'number | E'.
24-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(46,5): error TS2411: Property 'foo13' of type '<T>(x: T) => T' is not assignable to string index type 'number | E'.
25-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(47,5): error TS2411: Property 'foo14' of type 'typeof f' is not assignable to string index type 'number | E'.
26-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(48,5): error TS2411: Property 'foo15' of type 'typeof c' is not assignable to string index type 'number | E'.
27-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(49,5): error TS2411: Property 'foo16' of type 'T' is not assignable to string index type 'number | E'.
28-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(50,5): error TS2411: Property 'foo17' of type 'Object' is not assignable to string index type 'number | E'.
29-
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(51,5): error TS2411: Property 'foo18' of type '{}' is not assignable to string index type 'number | E'.
15+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(35,5): error TS2411: Property 'foo2' of type 'string' is not assignable to string index type 'number'.
16+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(37,5): error TS2411: Property 'foo4' of type 'boolean' is not assignable to string index type 'number'.
17+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(39,5): error TS2411: Property 'foo6' of type 'Date' is not assignable to string index type 'number'.
18+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(40,5): error TS2411: Property 'foo7' of type 'RegExp' is not assignable to string index type 'number'.
19+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(41,5): error TS2411: Property 'foo8' of type '{ bar: number; }' is not assignable to string index type 'number'.
20+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(42,5): error TS2411: Property 'foo9' of type 'I8' is not assignable to string index type 'number'.
21+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(43,5): error TS2411: Property 'foo10' of type 'A' is not assignable to string index type 'number'.
22+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(44,5): error TS2411: Property 'foo11' of type 'A2<number>' is not assignable to string index type 'number'.
23+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(45,5): error TS2411: Property 'foo12' of type '(x: any) => number' is not assignable to string index type 'number'.
24+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(46,5): error TS2411: Property 'foo13' of type '<T>(x: T) => T' is not assignable to string index type 'number'.
25+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(47,5): error TS2411: Property 'foo14' of type 'typeof f' is not assignable to string index type 'number'.
26+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(48,5): error TS2411: Property 'foo15' of type 'typeof c' is not assignable to string index type 'number'.
27+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(49,5): error TS2411: Property 'foo16' of type 'T' is not assignable to string index type 'number'.
28+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(50,5): error TS2411: Property 'foo17' of type 'Object' is not assignable to string index type 'number'.
29+
tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts(51,5): error TS2411: Property 'foo18' of type '{}' is not assignable to string index type 'number'.
3030

3131

3232
==== tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts (29 errors) ====
@@ -94,49 +94,49 @@ tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOf
9494
foo: any; // ok
9595
foo2: string; // error
9696
~~~~~~~~~~~~~
97-
!!! error TS2411: Property 'foo2' of type 'string' is not assignable to string index type 'number | E'.
97+
!!! error TS2411: Property 'foo2' of type 'string' is not assignable to string index type 'number'.
9898
foo3: number; // ok
9999
foo4: boolean; // error
100100
~~~~~~~~~~~~~~
101-
!!! error TS2411: Property 'foo4' of type 'boolean' is not assignable to string index type 'number | E'.
101+
!!! error TS2411: Property 'foo4' of type 'boolean' is not assignable to string index type 'number'.
102102
foo5: E; // ok
103103
foo6: Date; // error
104104
~~~~~~~~~~~
105-
!!! error TS2411: Property 'foo6' of type 'Date' is not assignable to string index type 'number | E'.
105+
!!! error TS2411: Property 'foo6' of type 'Date' is not assignable to string index type 'number'.
106106
foo7: RegExp; // error
107107
~~~~~~~~~~~~~
108-
!!! error TS2411: Property 'foo7' of type 'RegExp' is not assignable to string index type 'number | E'.
108+
!!! error TS2411: Property 'foo7' of type 'RegExp' is not assignable to string index type 'number'.
109109
foo8: { bar: number }; // error
110110
~~~~~~~~~~~~~~~~~~~~~~
111-
!!! error TS2411: Property 'foo8' of type '{ bar: number; }' is not assignable to string index type 'number | E'.
111+
!!! error TS2411: Property 'foo8' of type '{ bar: number; }' is not assignable to string index type 'number'.
112112
foo9: I8; // error
113113
~~~~~~~~~
114-
!!! error TS2411: Property 'foo9' of type 'I8' is not assignable to string index type 'number | E'.
114+
!!! error TS2411: Property 'foo9' of type 'I8' is not assignable to string index type 'number'.
115115
foo10: A; // error
116116
~~~~~~~~~
117-
!!! error TS2411: Property 'foo10' of type 'A' is not assignable to string index type 'number | E'.
117+
!!! error TS2411: Property 'foo10' of type 'A' is not assignable to string index type 'number'.
118118
foo11: A2<number>; // error
119119
~~~~~~~~~~~~~~~~~~
120-
!!! error TS2411: Property 'foo11' of type 'A2<number>' is not assignable to string index type 'number | E'.
120+
!!! error TS2411: Property 'foo11' of type 'A2<number>' is not assignable to string index type 'number'.
121121
foo12: (x) => number; //error
122122
~~~~~~~~~~~~~~~~~~~~~
123-
!!! error TS2411: Property 'foo12' of type '(x: any) => number' is not assignable to string index type 'number | E'.
123+
!!! error TS2411: Property 'foo12' of type '(x: any) => number' is not assignable to string index type 'number'.
124124
foo13: <T>(x: T) => T; // error
125125
~~~~~~~~~~~~~~~~~~~~~~
126-
!!! error TS2411: Property 'foo13' of type '<T>(x: T) => T' is not assignable to string index type 'number | E'.
126+
!!! error TS2411: Property 'foo13' of type '<T>(x: T) => T' is not assignable to string index type 'number'.
127127
foo14: typeof f; // error
128128
~~~~~~~~~~~~~~~~
129-
!!! error TS2411: Property 'foo14' of type 'typeof f' is not assignable to string index type 'number | E'.
129+
!!! error TS2411: Property 'foo14' of type 'typeof f' is not assignable to string index type 'number'.
130130
foo15: typeof c; // error
131131
~~~~~~~~~~~~~~~~
132-
!!! error TS2411: Property 'foo15' of type 'typeof c' is not assignable to string index type 'number | E'.
132+
!!! error TS2411: Property 'foo15' of type 'typeof c' is not assignable to string index type 'number'.
133133
foo16: T; // error
134134
~~~~~~~~~
135-
!!! error TS2411: Property 'foo16' of type 'T' is not assignable to string index type 'number | E'.
135+
!!! error TS2411: Property 'foo16' of type 'T' is not assignable to string index type 'number'.
136136
foo17: Object; // error
137137
~~~~~~~~~~~~~~
138-
!!! error TS2411: Property 'foo17' of type 'Object' is not assignable to string index type 'number | E'.
138+
!!! error TS2411: Property 'foo17' of type 'Object' is not assignable to string index type 'number'.
139139
foo18: {}; // error
140140
~~~~~~~~~~
141-
!!! error TS2411: Property 'foo18' of type '{}' is not assignable to string index type 'number | E'.
141+
!!! error TS2411: Property 'foo18' of type '{}' is not assignable to string index type 'number'.
142142
}

0 commit comments

Comments
 (0)