File: instanceSubtypeCheck2.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-- 618 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/instanceSubtypeCheck2.ts(5,7): error TS2415: Class 'C2<T>' incorrectly extends base class 'C1<T>'.
  Types of property 'x' are incompatible.
    Type 'string' is not assignable to type 'C2<T>'.


==== tests/cases/compiler/instanceSubtypeCheck2.ts (1 errors) ====
    class C1<T> {
        x: C2<T>;
    }
    
    class C2<T> extends C1<T> {
          ~~
!!! error TS2415: Class 'C2<T>' incorrectly extends base class 'C1<T>'.
!!! error TS2415:   Types of property 'x' are incompatible.
!!! error TS2415:     Type 'string' is not assignable to type 'C2<T>'.
        x: string
    }