2014-10-28 08:28:59 +01:00
|
|
|
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>'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'x' is missing in type 'String'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/instanceSubtypeCheck2.ts (1 errors) ====
|
|
|
|
class C1<T> {
|
|
|
|
x: C2<T>;
|
|
|
|
}
|
|
|
|
|
|
|
|
class C2<T> extends C1<T> {
|
|
|
|
~~
|
2014-10-28 08:28:59 +01:00
|
|
|
!!! 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>'.
|
|
|
|
!!! error TS2415: Property 'x' is missing in type 'String'.
|
2014-07-13 01:04:16 +02:00
|
|
|
x: string
|
|
|
|
}
|