Skip to content

Commit cd92006

Browse files
committed
Actually accept baselines, lol
1 parent 579066d commit cd92006

5 files changed

+38
-165
lines changed

tests/baselines/reference/invariantGenericErrorElaboration.errors.txt

-52
This file was deleted.

tests/baselines/reference/invariantGenericErrorElaboration.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const wat: Runtype<any> = Num;
66
>Num : Num
77

88
const Foo = Obj({ foo: Num })
9-
>Foo : any
10-
>Obj({ foo: Num }) : any
9+
>Foo : Obj<{ foo: Num; }>
10+
>Obj({ foo: Num }) : Obj<{ foo: Num; }>
1111
>Obj : <O extends { [_: string]: Runtype<any>; }>(fields: O) => Obj<O>
1212
>{ foo: Num } : { foo: Num; }
1313
>foo : Num

tests/baselines/reference/recursiveTypeComparison.errors.txt

-27
This file was deleted.

tests/baselines/reference/strictFunctionTypesErrors.errors.txt

+30-72
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,15 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(21,1): error TS2322: Type '(x:
1717
tests/cases/compiler/strictFunctionTypesErrors.ts(23,1): error TS2322: Type '(x: string) => Object' is not assignable to type '(x: string) => string'.
1818
Type 'Object' is not assignable to type 'string'.
1919
tests/cases/compiler/strictFunctionTypesErrors.ts(33,1): error TS2322: Type 'Func<string, Object>' is not assignable to type 'Func<Object, Object>'.
20-
Types of parameters 'x' and 'x' are incompatible.
21-
Type 'Object' is not assignable to type 'string'.
20+
Type 'Object' is not assignable to type 'string'.
2221
tests/cases/compiler/strictFunctionTypesErrors.ts(34,1): error TS2322: Type 'Func<string, string>' is not assignable to type 'Func<Object, Object>'.
23-
Types of parameters 'x' and 'x' are incompatible.
24-
Type 'Object' is not assignable to type 'string'.
22+
Type 'Object' is not assignable to type 'string'.
2523
tests/cases/compiler/strictFunctionTypesErrors.ts(36,1): error TS2322: Type 'Func<Object, Object>' is not assignable to type 'Func<Object, string>'.
2624
Type 'Object' is not assignable to type 'string'.
2725
tests/cases/compiler/strictFunctionTypesErrors.ts(37,1): error TS2322: Type 'Func<string, Object>' is not assignable to type 'Func<Object, string>'.
28-
Types of parameters 'x' and 'x' are incompatible.
29-
Type 'Object' is not assignable to type 'string'.
26+
Type 'Object' is not assignable to type 'string'.
3027
tests/cases/compiler/strictFunctionTypesErrors.ts(38,1): error TS2322: Type 'Func<string, string>' is not assignable to type 'Func<Object, string>'.
31-
Types of parameters 'x' and 'x' are incompatible.
32-
Type 'Object' is not assignable to type 'string'.
28+
Type 'Object' is not assignable to type 'string'.
3329
tests/cases/compiler/strictFunctionTypesErrors.ts(44,1): error TS2322: Type 'Func<Object, Object>' is not assignable to type 'Func<string, string>'.
3430
Type 'Object' is not assignable to type 'string'.
3531
tests/cases/compiler/strictFunctionTypesErrors.ts(46,1): error TS2322: Type 'Func<string, Object>' is not assignable to type 'Func<string, string>'.
@@ -39,53 +35,36 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(57,1): error TS2322: Type 'Fun
3935
tests/cases/compiler/strictFunctionTypesErrors.ts(58,1): error TS2322: Type 'Func<Func<string, void>, Object>' is not assignable to type 'Func<Func<Object, void>, string>'.
4036
Type 'Object' is not assignable to type 'string'.
4137
tests/cases/compiler/strictFunctionTypesErrors.ts(61,1): error TS2322: Type 'Func<Func<Object, void>, Object>' is not assignable to type 'Func<Func<string, void>, Object>'.
42-
Types of parameters 'x' and 'x' are incompatible.
43-
Types of parameters 'x' and 'x' are incompatible.
44-
Type 'Object' is not assignable to type 'string'.
38+
Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
39+
Type 'Object' is not assignable to type 'string'.
4540
tests/cases/compiler/strictFunctionTypesErrors.ts(62,1): error TS2322: Type 'Func<Func<Object, void>, string>' is not assignable to type 'Func<Func<string, void>, Object>'.
46-
Types of parameters 'x' and 'x' are incompatible.
47-
Types of parameters 'x' and 'x' are incompatible.
48-
Type 'Object' is not assignable to type 'string'.
41+
Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
4942
tests/cases/compiler/strictFunctionTypesErrors.ts(65,1): error TS2322: Type 'Func<Func<Object, void>, Object>' is not assignable to type 'Func<Func<string, void>, string>'.
50-
Types of parameters 'x' and 'x' are incompatible.
51-
Types of parameters 'x' and 'x' are incompatible.
52-
Type 'Object' is not assignable to type 'string'.
43+
Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
5344
tests/cases/compiler/strictFunctionTypesErrors.ts(66,1): error TS2322: Type 'Func<Func<Object, void>, string>' is not assignable to type 'Func<Func<string, void>, string>'.
54-
Types of parameters 'x' and 'x' are incompatible.
55-
Types of parameters 'x' and 'x' are incompatible.
56-
Type 'Object' is not assignable to type 'string'.
45+
Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
5746
tests/cases/compiler/strictFunctionTypesErrors.ts(67,1): error TS2322: Type 'Func<Func<string, void>, Object>' is not assignable to type 'Func<Func<string, void>, string>'.
5847
Type 'Object' is not assignable to type 'string'.
5948
tests/cases/compiler/strictFunctionTypesErrors.ts(74,1): error TS2322: Type 'Func<Object, Func<string, void>>' is not assignable to type 'Func<Object, Func<Object, void>>'.
6049
Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
61-
Types of parameters 'x' and 'x' are incompatible.
62-
Type 'Object' is not assignable to type 'string'.
6350
tests/cases/compiler/strictFunctionTypesErrors.ts(75,1): error TS2322: Type 'Func<string, Func<Object, void>>' is not assignable to type 'Func<Object, Func<Object, void>>'.
64-
Types of parameters 'x' and 'x' are incompatible.
65-
Type 'Object' is not assignable to type 'string'.
51+
Type 'Object' is not assignable to type 'string'.
6652
tests/cases/compiler/strictFunctionTypesErrors.ts(76,1): error TS2322: Type 'Func<string, Func<string, void>>' is not assignable to type 'Func<Object, Func<Object, void>>'.
67-
Types of parameters 'x' and 'x' are incompatible.
68-
Type 'Object' is not assignable to type 'string'.
53+
Type 'Object' is not assignable to type 'string'.
6954
tests/cases/compiler/strictFunctionTypesErrors.ts(79,1): error TS2322: Type 'Func<string, Func<Object, void>>' is not assignable to type 'Func<Object, Func<string, void>>'.
70-
Types of parameters 'x' and 'x' are incompatible.
71-
Type 'Object' is not assignable to type 'string'.
55+
Type 'Object' is not assignable to type 'string'.
7256
tests/cases/compiler/strictFunctionTypesErrors.ts(80,1): error TS2322: Type 'Func<string, Func<string, void>>' is not assignable to type 'Func<Object, Func<string, void>>'.
73-
Types of parameters 'x' and 'x' are incompatible.
74-
Type 'Object' is not assignable to type 'string'.
57+
Type 'Object' is not assignable to type 'string'.
7558
tests/cases/compiler/strictFunctionTypesErrors.ts(83,1): error TS2322: Type 'Func<Object, Func<string, void>>' is not assignable to type 'Func<string, Func<Object, void>>'.
7659
Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
7760
tests/cases/compiler/strictFunctionTypesErrors.ts(84,1): error TS2322: Type 'Func<string, Func<string, void>>' is not assignable to type 'Func<string, Func<Object, void>>'.
7861
Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
7962
tests/cases/compiler/strictFunctionTypesErrors.ts(111,1): error TS2322: Type 'Comparer2<Dog>' is not assignable to type 'Comparer2<Animal>'.
8063
Property 'dog' is missing in type 'Animal' but required in type 'Dog'.
8164
tests/cases/compiler/strictFunctionTypesErrors.ts(126,1): error TS2322: Type 'Crate<Dog>' is not assignable to type 'Crate<Animal>'.
82-
Types of property 'onSetItem' are incompatible.
83-
Type '(item: Dog) => void' is not assignable to type '(item: Animal) => void'.
84-
Types of parameters 'item' and 'item' are incompatible.
85-
Type 'Animal' is not assignable to type 'Dog'.
65+
Type 'Animal' is not assignable to type 'Dog'.
8666
tests/cases/compiler/strictFunctionTypesErrors.ts(127,1): error TS2322: Type 'Crate<Animal>' is not assignable to type 'Crate<Dog>'.
87-
Types of property 'item' are incompatible.
88-
Type 'Animal' is not assignable to type 'Dog'.
67+
Type 'Animal' is not assignable to type 'Dog'.
8968
tests/cases/compiler/strictFunctionTypesErrors.ts(133,1): error TS2322: Type '(f: (x: Dog) => Dog) => void' is not assignable to type '(f: (x: Animal) => Animal) => void'.
9069
Types of parameters 'f' and 'f' are incompatible.
9170
Type 'Animal' is not assignable to type 'Dog'.
@@ -164,13 +143,11 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c
164143
g1 = g3; // Error
165144
~~
166145
!!! error TS2322: Type 'Func<string, Object>' is not assignable to type 'Func<Object, Object>'.
167-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
168-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
146+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
169147
g1 = g4; // Error
170148
~~
171149
!!! error TS2322: Type 'Func<string, string>' is not assignable to type 'Func<Object, Object>'.
172-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
173-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
150+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
174151

175152
g2 = g1; // Error
176153
~~
@@ -179,13 +156,11 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c
179156
g2 = g3; // Error
180157
~~
181158
!!! error TS2322: Type 'Func<string, Object>' is not assignable to type 'Func<Object, string>'.
182-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
183-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
159+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
184160
g2 = g4; // Error
185161
~~
186162
!!! error TS2322: Type 'Func<string, string>' is not assignable to type 'Func<Object, string>'.
187-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
188-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
163+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
189164

190165
g3 = g1; // Ok
191166
g3 = g2; // Ok
@@ -223,29 +198,22 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c
223198
h3 = h1; // Error
224199
~~
225200
!!! error TS2322: Type 'Func<Func<Object, void>, Object>' is not assignable to type 'Func<Func<string, void>, Object>'.
226-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
227-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
228-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
201+
!!! error TS2322: Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
202+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
229203
h3 = h2; // Error
230204
~~
231205
!!! error TS2322: Type 'Func<Func<Object, void>, string>' is not assignable to type 'Func<Func<string, void>, Object>'.
232-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
233-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
234-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
206+
!!! error TS2322: Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
235207
h3 = h4; // Ok
236208

237209
h4 = h1; // Error
238210
~~
239211
!!! error TS2322: Type 'Func<Func<Object, void>, Object>' is not assignable to type 'Func<Func<string, void>, string>'.
240-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
241-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
242-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
212+
!!! error TS2322: Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
243213
h4 = h2; // Error
244214
~~
245215
!!! error TS2322: Type 'Func<Func<Object, void>, string>' is not assignable to type 'Func<Func<string, void>, string>'.
246-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
247-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
248-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
216+
!!! error TS2322: Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
249217
h4 = h3; // Error
250218
~~
251219
!!! error TS2322: Type 'Func<Func<string, void>, Object>' is not assignable to type 'Func<Func<string, void>, string>'.
@@ -260,30 +228,24 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c
260228
~~
261229
!!! error TS2322: Type 'Func<Object, Func<string, void>>' is not assignable to type 'Func<Object, Func<Object, void>>'.
262230
!!! error TS2322: Type 'Func<string, void>' is not assignable to type 'Func<Object, void>'.
263-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
264-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
265231
i1 = i3; // Error
266232
~~
267233
!!! error TS2322: Type 'Func<string, Func<Object, void>>' is not assignable to type 'Func<Object, Func<Object, void>>'.
268-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
269-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
234+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
270235
i1 = i4; // Error
271236
~~
272237
!!! error TS2322: Type 'Func<string, Func<string, void>>' is not assignable to type 'Func<Object, Func<Object, void>>'.
273-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
274-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
238+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
275239

276240
i2 = i1; // Ok
277241
i2 = i3; // Error
278242
~~
279243
!!! error TS2322: Type 'Func<string, Func<Object, void>>' is not assignable to type 'Func<Object, Func<string, void>>'.
280-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
281-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
244+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
282245
i2 = i4; // Error
283246
~~
284247
!!! error TS2322: Type 'Func<string, Func<string, void>>' is not assignable to type 'Func<Object, Func<string, void>>'.
285-
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
286-
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
248+
!!! error TS2322: Type 'Object' is not assignable to type 'string'.
287249

288250
i3 = i1; // Ok
289251
i3 = i2; // Error
@@ -342,15 +304,11 @@ tests/cases/compiler/strictFunctionTypesErrors.ts(155,5): error TS2322: Type '(c
342304
animalCrate = dogCrate; // Error
343305
~~~~~~~~~~~
344306
!!! error TS2322: Type 'Crate<Dog>' is not assignable to type 'Crate<Animal>'.
345-
!!! error TS2322: Types of property 'onSetItem' are incompatible.
346-
!!! error TS2322: Type '(item: Dog) => void' is not assignable to type '(item: Animal) => void'.
347-
!!! error TS2322: Types of parameters 'item' and 'item' are incompatible.
348-
!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'.
307+
!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'.
349308
dogCrate = animalCrate; // Error
350309
~~~~~~~~
351310
!!! error TS2322: Type 'Crate<Animal>' is not assignable to type 'Crate<Dog>'.
352-
!!! error TS2322: Types of property 'item' are incompatible.
353-
!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'.
311+
!!! error TS2322: Type 'Animal' is not assignable to type 'Dog'.
354312

355313
// Verify that callback parameters are strictly checked
356314

0 commit comments

Comments
 (0)