tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(26,28): error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration.
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(29,24): error TS2675: Cannot extend a class 'BaseC'. Class constructor is marked as private.
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(32,28): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration.
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(36,10): error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration.
tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts(37,10): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration.


==== tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility2.ts (5 errors) ====
    
    class BaseA {
        public constructor(public x: number) { }
        createInstance() { new BaseA(1); }
    }
    
    class BaseB {
        protected constructor(public x: number) { }
        createInstance() { new BaseB(1); }
    }
    
    class BaseC {
         private constructor(public x: number) { }
         createInstance() { new BaseC(1); }
    }
    
    class DerivedA extends BaseA {
        constructor(public x: number) { super(x); }
        createInstance() { new DerivedA(1); }
        createBaseInstance() { new BaseA(1); }
    }
    
    class DerivedB extends BaseB {
        constructor(public x: number) { super(x); }
        createInstance() { new DerivedB(1); }
        createBaseInstance() { new BaseB(1); } // error
                               ~~~~~~~~~~~~
!!! error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration.
    }
    
    class DerivedC extends BaseC { // error
                           ~~~~~
!!! error TS2675: Cannot extend a class 'BaseC'. Class constructor is marked as private.
        constructor(public x: number) { super(x); }
        createInstance() { new DerivedC(1); }
        createBaseInstance() { new BaseC(1); } // error
                               ~~~~~~~~~~~~
!!! error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration.
    }
    
    var ba = new BaseA(1);
    var bb = new BaseB(1); // error
             ~~~~~~~~~~~~
!!! error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration.
    var bc = new BaseC(1); // error
             ~~~~~~~~~~~~
!!! error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration.
    
    var da = new DerivedA(1);
    var db = new DerivedB(1);
    var dc = new DerivedC(1);