//// [tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts] ////

//// [classExtendsItselfIndirectly2.ts]
class C extends N.E { foo: string; } // error

namespace M {
    export class D extends C { bar: string; }

}

namespace N {
    export class E extends M.D { baz: number; }
}

namespace O {
    class C2<T> extends Q.E2<T> { foo: T; } // error

    namespace P {
        export class D2<T> extends C2<T> { bar: T; }
    }

    namespace Q {
        export class E2<T> extends P.D2<T> { baz: T; }
    }
}

//// [classExtendsItselfIndirectly2.js]
"use strict";
class C extends N.E {
} // error
var M;
(function (M) {
    class D extends C {
    }
    M.D = D;
})(M || (M = {}));
var N;
(function (N) {
    class E extends M.D {
    }
    N.E = E;
})(N || (N = {}));
var O;
(function (O) {
    class C2 extends Q.E2 {
    } // error
    let P;
    (function (P) {
        class D2 extends C2 {
        }
        P.D2 = D2;
    })(P || (P = {}));
    let Q;
    (function (Q) {
        class E2 extends P.D2 {
        }
        Q.E2 = E2;
    })(Q || (Q = {}));
})(O || (O = {}));
