16 lines
633 B
Text
16 lines
633 B
Text
|
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts (2 errors) ====
|
||
|
class C extends E { foo: string; } // error
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
!!! Type 'C' recursively references itself as a base type.
|
||
|
|
||
|
class D extends C { bar: string; }
|
||
|
|
||
|
class E extends D { baz: number; }
|
||
|
|
||
|
class C2<T> extends E2<T> { foo: T; } // error
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
!!! Type 'C2<T>' recursively references itself as a base type.
|
||
|
|
||
|
class D2<T> extends C2<T> { bar: T; }
|
||
|
|
||
|
class E2<T> extends D2<T> { baz: T; }
|