27 lines
No EOL
783 B
Text
27 lines
No EOL
783 B
Text
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts (2 errors) ====
|
|
class C extends N.E { foo: string; } // error
|
|
~
|
|
!!! Type 'C' recursively references itself as a base type.
|
|
|
|
module M {
|
|
export class D extends C { bar: string; }
|
|
|
|
}
|
|
|
|
module N {
|
|
export class E extends M.D { baz: number; }
|
|
}
|
|
|
|
module O {
|
|
class C2<T> extends Q.E2<T> { foo: T; } // error
|
|
~~
|
|
!!! Type 'C2<T>' recursively references itself as a base type.
|
|
|
|
module P {
|
|
export class D2<T> extends C2<T> { bar: T; }
|
|
}
|
|
|
|
module Q {
|
|
export class E2<T> extends P.D2<T> { baz: T; }
|
|
}
|
|
} |