TypeScript/tests/baselines/reference/instanceSubtypeCheck2.errors.txt
2014-09-12 13:35:07 -07:00

19 lines
No EOL
734 B
Text

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