File: implicitAnyGenericTypeInference.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 698 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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, '');