13 lines
422 B
Plaintext
13 lines
422 B
Plaintext
|
==== 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, '');
|