tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(22,7): error TS2415: Class 'Derived1' incorrectly extends base class 'Base'.
  Property 'a' is protected in type 'Derived1' but public in type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(24,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(28,15): error TS2416: Property 'b' in type 'Derived2' is not assignable to the same property in base type 'Base'.
  Type '(a: { foo: string; }) => void' is not assignable to type '(a: { foo: string; }) => void'. Two different types with this name exist, but they are unrelated.
    The 'this' types of each signature are incompatible.
      Type 'Base' is not assignable to type 'Derived2'.
        Property 'b' is protected but type 'Base' is not a class derived from 'Derived2'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(29,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(32,7): error TS2415: Class 'Derived3' incorrectly extends base class 'Base'.
  Property 'c' is protected in type 'Derived3' but public in type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(34,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(37,7): error TS2415: Class 'Derived4' incorrectly extends base class 'Base'.
  Property 'c' is protected in type 'Derived4' but public in type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(39,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(42,7): error TS2415: Class 'Derived5' incorrectly extends base class 'Base'.
  Property 'd' is protected in type 'Derived5' but public in type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(44,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(47,7): error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'.
  Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(49,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(52,7): error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'.
  Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(54,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(57,7): error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'.
  Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(59,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(62,7): error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'.
  Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(64,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'.
  Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'.
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts(69,32): error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.


==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts (20 errors) ====
    var x: { foo: string; }
    var y: { foo: string; bar: string; }
    
    class Base {
        a: typeof x;
        b(a: typeof x) { }
        get c() { return x; }
        set c(v: typeof x) { }
        d: (a: typeof x) => void;
    
        static r: typeof x;
        static s(a: typeof x) { }
        static get t() { return x; }
        static set t(v: typeof x) { }
        static u: (a: typeof x) => void;
    
        constructor(a: typeof x) {}
    }
    
    // Errors
    // decrease visibility of all public members to protected
    class Derived1 extends Base {
          ~~~~~~~~
!!! error TS2415: Class 'Derived1' incorrectly extends base class 'Base'.
!!! error TS2415:   Property 'a' is protected in type 'Derived1' but public in type 'Base'.
        protected a: typeof x;
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived2 extends Base {
        protected b(a: typeof x) { }
                  ~
!!! error TS2416: Property 'b' in type 'Derived2' is not assignable to the same property in base type 'Base'.
!!! error TS2416:   Type '(a: { foo: string; }) => void' is not assignable to type '(a: { foo: string; }) => void'. Two different types with this name exist, but they are unrelated.
!!! error TS2416:     The 'this' types of each signature are incompatible.
!!! error TS2416:       Type 'Base' is not assignable to type 'Derived2'.
!!! error TS2416:         Property 'b' is protected but type 'Base' is not a class derived from 'Derived2'.
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived3 extends Base {
          ~~~~~~~~
!!! error TS2415: Class 'Derived3' incorrectly extends base class 'Base'.
!!! error TS2415:   Property 'c' is protected in type 'Derived3' but public in type 'Base'.
        protected get c() { return x; }
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived4 extends Base {
          ~~~~~~~~
!!! error TS2415: Class 'Derived4' incorrectly extends base class 'Base'.
!!! error TS2415:   Property 'c' is protected in type 'Derived4' but public in type 'Base'.
        protected set c(v: typeof x) { }
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived5 extends Base {
          ~~~~~~~~
!!! error TS2415: Class 'Derived5' incorrectly extends base class 'Base'.
!!! error TS2415:   Property 'd' is protected in type 'Derived5' but public in type 'Base'.
        protected d: (a: typeof x) => void ;
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived6 extends Base {
          ~~~~~~~~
!!! error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'.
!!! error TS2417:   Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'.
        protected static r: typeof x;
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived7 extends Base {
          ~~~~~~~~
!!! error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'.
!!! error TS2417:   Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'.
        protected static s(a: typeof x) { }
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived8 extends Base {
          ~~~~~~~~
!!! error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'.
!!! error TS2417:   Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'.
        protected static get t() { return x; }
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived9 extends Base {
          ~~~~~~~~
!!! error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'.
!!! error TS2417:   Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'.
        protected static set t(v: typeof x) { }
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }
    
    class Derived10 extends Base {
          ~~~~~~~~~
!!! error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'.
!!! error TS2417:   Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'.
        protected static u: (a: typeof x) => void ;
        constructor(a: typeof x) { super(a); }
                                   ~~~~~~~~
!!! error TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'Base'.
    }