17 lines
698 B
Plaintext
17 lines
698 B
Plaintext
tests/cases/compiler/implicitAnyGenericTypeInference.ts(7,19): error TS7006: Parameter 'x' implicitly has an 'any' type.
|
|
tests/cases/compiler/implicitAnyGenericTypeInference.ts(7,22): error TS7006: Parameter 'y' implicitly has an 'any' type.
|
|
|
|
|
|
==== 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; } };
|
|
~
|
|
!!! error TS7006: Parameter 'x' implicitly has an 'any' type.
|
|
~
|
|
!!! error TS7006: Parameter 'y' implicitly has an 'any' type.
|
|
var r = c.compareTo(1, ''); |