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

17 lines
698 B
Plaintext
Raw Normal View History

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.
2014-07-13 01:04:16 +02:00
==== 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.
2014-07-13 01:04:16 +02:00
~
!!! error TS7006: Parameter 'y' implicitly has an 'any' type.
2014-07-13 01:04:16 +02:00
var r = c.compareTo(1, '');