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

33 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts (8 errors) ====
function foo<T, U>(x:T, y:U, f: (v: T) => U) {
var r1 = f<number>(1);
~~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
var r2 = f(1);
~
2014-07-25 04:39:50 +02:00
!!! 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);
~~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
var r4 = f(null);
var r11 = f(x);
var r21 = f<number>(x);
~~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
var r31 = f<any>(null);
~~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
var r41 = f(null);
var r12 = f(y);
~
2014-07-25 04:39:50 +02:00
!!! Argument of type 'U' is not assignable to parameter of type 'T'.
2014-07-13 01:04:16 +02:00
var r22 = f<number>(y);
~~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
var r32 = f<any>(null);
~~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
var r42 = f(null);
}