TypeScript/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt

19 lines
1 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts(2,13): error TS2346: Supplied parameters do not match any signature of call target.
tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts(3,15): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts(4,13): error TS2346: Supplied parameters do not match any signature of call target.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts (3 errors) ====
function foo<T, U>(f: (v: T) => U) {
var r1 = f<number>(1);
~~~~~~~~~~~~
!!! error TS2346: Supplied parameters do not match any signature of call target.
2014-07-13 01:04:16 +02:00
var r2 = f(1);
~
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
2014-07-13 01:04:16 +02:00
var r3 = f<any>(null);
~~~~~~~~~~~~
!!! error TS2346: Supplied parameters do not match any signature of call target.
2014-07-13 01:04:16 +02:00
var r4 = f(null);
}