13 lines
422 B
Text
13 lines
422 B
Text
|
==== tests/cases/compiler/implicitAnyGenericTypeInference.ts (2 errors) ====
|
||
|
|
||
|
interface Comparer<T> {
|
||
|
compareTo<U>(x: T, y: U): U;
|
||
|
}
|
||
|
|
||
|
var c: Comparer<any>;
|
||
|
c = { compareTo: (x, y) => { return y; } };
|
||
|
~
|
||
|
!!! Parameter 'x' implicitly has an 'any' type.
|
||
|
~
|
||
|
!!! Parameter 'y' implicitly has an 'any' type.
|
||
|
var r = c.compareTo(1, '');
|