TypeScript/tests/baselines/reference/typeAssertionToGenericFunctionType.errors.txt
2014-07-24 19:39:50 -07:00

11 lines
529 B
Plaintext

==== tests/cases/compiler/typeAssertionToGenericFunctionType.ts (2 errors) ====
var x = {
a: < <T>(x: T) => T > ((x: any) => 1),
b: <T>(x: T) => { x }
}
x.a<string>(1); // bug was that this caused 'Could not find symbol T' on return type T in the type assertion on x.a's definition
~
!!! Argument of type 'number' is not assignable to parameter of type 'string'.
x.b<string>(); // error
~~~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.