mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
Accept new baselines
This commit is contained in:
parent
7f90ad1155
commit
4b2fc79451
@ -190,4 +190,12 @@ tests/cases/compiler/genericFunctionInference1.ts(83,14): error TS2345: Argument
|
||||
x => x,
|
||||
x => first(x),
|
||||
);
|
||||
|
||||
// Repro from #30297
|
||||
|
||||
declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
|
||||
|
||||
foo2(() => {});
|
||||
foo2(identity);
|
||||
foo2(identity, 1);
|
||||
|
||||
@ -183,6 +183,14 @@ const fn62 = pipe(
|
||||
x => x,
|
||||
x => first(x),
|
||||
);
|
||||
|
||||
// Repro from #30297
|
||||
|
||||
declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
|
||||
|
||||
foo2(() => {});
|
||||
foo2(identity);
|
||||
foo2(identity, 1);
|
||||
|
||||
|
||||
//// [genericFunctionInference1.js]
|
||||
@ -265,3 +273,6 @@ const fn40 = pipe(getString, string => orUndefined(string), identity);
|
||||
const fn60 = pipe(getArray, x => x, first);
|
||||
const fn61 = pipe(getArray, identity, first);
|
||||
const fn62 = pipe(getArray, x => x, x => first(x));
|
||||
foo2(() => { });
|
||||
foo2(identity);
|
||||
foo2(identity, 1);
|
||||
|
||||
@ -848,3 +848,30 @@ const fn62 = pipe(
|
||||
|
||||
);
|
||||
|
||||
// Repro from #30297
|
||||
|
||||
declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 183, 2))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 187, 22))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 187, 24))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 187, 22))
|
||||
>fn : Symbol(fn, Decl(genericFunctionInference1.ts, 187, 32))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 187, 22))
|
||||
>a : Symbol(a, Decl(genericFunctionInference1.ts, 187, 38))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 187, 24))
|
||||
>b : Symbol(b, Decl(genericFunctionInference1.ts, 187, 45))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 187, 24))
|
||||
>T : Symbol(T, Decl(genericFunctionInference1.ts, 187, 22))
|
||||
>U : Symbol(U, Decl(genericFunctionInference1.ts, 187, 24))
|
||||
|
||||
foo2(() => {});
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 183, 2))
|
||||
|
||||
foo2(identity);
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 183, 2))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
|
||||
foo2(identity, 1);
|
||||
>foo2 : Symbol(foo2, Decl(genericFunctionInference1.ts, 183, 2))
|
||||
>identity : Symbol(identity, Decl(genericFunctionInference1.ts, 154, 13))
|
||||
|
||||
|
||||
@ -799,3 +799,27 @@ const fn62 = pipe(
|
||||
|
||||
);
|
||||
|
||||
// Repro from #30297
|
||||
|
||||
declare function foo2<T, U = T>(fn: T, a?: U, b?: U): [T, U];
|
||||
>foo2 : <T, U = T>(fn: T, a?: U | undefined, b?: U | undefined) => [T, U]
|
||||
>fn : T
|
||||
>a : U | undefined
|
||||
>b : U | undefined
|
||||
|
||||
foo2(() => {});
|
||||
>foo2(() => {}) : [() => void, () => void]
|
||||
>foo2 : <T, U = T>(fn: T, a?: U | undefined, b?: U | undefined) => [T, U]
|
||||
>() => {} : () => void
|
||||
|
||||
foo2(identity);
|
||||
>foo2(identity) : [<T>(value: T) => T, {}]
|
||||
>foo2 : <T, U = T>(fn: T, a?: U | undefined, b?: U | undefined) => [T, U]
|
||||
>identity : <T>(value: T) => T
|
||||
|
||||
foo2(identity, 1);
|
||||
>foo2(identity, 1) : [<T>(value: T) => T, number]
|
||||
>foo2 : <T, U = T>(fn: T, a?: U | undefined, b?: U | undefined) => [T, U]
|
||||
>identity : <T>(value: T) => T
|
||||
>1 : 1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user