Skip to content

Commit e7afa6c

Browse files
committed
Accept new baselines
1 parent fd0d477 commit e7afa6c

File tree

4 files changed

+306
-233
lines changed

4 files changed

+306
-233
lines changed

tests/baselines/reference/genericFunctionInference1.errors.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/genericFunctionInference1.ts(83,14): error TS2345: Argument of type '<a>(value: { key: a; }) => a' is not assignable to parameter of type '(value: Data) => string'.
1+
tests/cases/compiler/genericFunctionInference1.ts(88,14): error TS2345: Argument of type '<a>(value: { key: a; }) => a' is not assignable to parameter of type '(value: Data) => string'.
22
Type 'number' is not assignable to type 'string'.
33

44

@@ -62,6 +62,11 @@ tests/cases/compiler/genericFunctionInference1.ts(83,14): error TS2345: Argument
6262

6363
const f50 = pipe5(list); // No higher order inference
6464

65+
declare function wrap3<A, B, C>(f: (a: A, b1: B, b2: B) => C): (a: A, b1: B, b2: B) => C;
66+
declare function baz<T, U extends T>(t1: T, t2: T, u: U): [T, U];
67+
68+
let f60 = wrap3(baz);
69+
6570
// #417
6671

6772
function mirror<A, B>(f: (a: A) => B): (a: A) => B { return f; }

tests/baselines/reference/genericFunctionInference1.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ declare function pipe5<A, B>(f: (a: A) => B): { f: (a: A) => B };
5858

5959
const f50 = pipe5(list); // No higher order inference
6060

61+
declare function wrap3<A, B, C>(f: (a: A, b1: B, b2: B) => C): (a: A, b1: B, b2: B) => C;
62+
declare function baz<T, U extends T>(t1: T, t2: T, u: U): [T, U];
63+
64+
let f60 = wrap3(baz);
65+
6166
// #417
6267

6368
function mirror<A, B>(f: (a: A) => B): (a: A) => B { return f; }
@@ -236,6 +241,7 @@ const f32 = pipe3(list, list);
236241
const f40 = pipe4([list, box]);
237242
const f41 = pipe4([box, list]);
238243
const f50 = pipe5(list); // No higher order inference
244+
let f60 = wrap3(baz);
239245
// #417
240246
function mirror(f) { return f; }
241247
var identityM = mirror(identity);

0 commit comments

Comments
 (0)