==== tests/cases/compiler/implementingAnInterfaceExtendingClassWithPrivates2.ts (15 errors) ====
    class Foo {
        private x: string;
    }
    
    interface I extends Foo {
        y: number;
    }
    
    class Bar extends Foo implements I { // ok
        y: number;
    }
    
    class Bar2 extends Foo implements I { // error
          ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(13,7): error TS2137: Class Bar2 declares interface I but does not implement it:
!!! 	Property 'x' defined as public in type 'Bar2' is defined as private in type 'Foo'.
          ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(13,7): error TS2141: Class 'Bar2' cannot extend class 'Foo':
!!! 	Property 'x' defined as public in type 'Bar2' is defined as private in type 'Foo'.
        x: string;
        y: number;
    }
    
    class Bar3 extends Foo implements I { // error
          ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(18,7): error TS2137: Class Bar3 declares interface I but does not implement it:
!!! 	Types 'Bar3' and 'Foo' define property 'x' as private.
          ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(18,7): error TS2141: Class 'Bar3' cannot extend class 'Foo':
!!! 	Types 'Bar3' and 'Foo' define property 'x' as private.
        private x: string;
        y: number;
    }
    
    // another level of indirection
    module M {
        class Foo {
            private x: string;
        }
    
        class Baz extends Foo {
            z: number;
        }
    
        interface I extends Baz {
            y: number;
        }
    
        class Bar extends Foo implements I { // ok
            y: number;
            z: number;
        }
    
        class Bar2 extends Foo implements I { // error
              ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(42,11): error TS2137: Class Bar2 declares interface I but does not implement it:
!!! 	Type 'Bar2' is missing property 'z' from type 'I'.
              ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(42,11): error TS2141: Class 'M.Bar2' cannot extend class 'M.Foo':
!!! 	Property 'x' defined as public in type 'Bar2' is defined as private in type 'Foo'.
            x: string;
            y: number;
        }
    
        class Bar3 extends Foo implements I { // error
              ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(47,11): error TS2137: Class Bar3 declares interface I but does not implement it:
!!! 	Type 'Bar3' is missing property 'z' from type 'I'.
              ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(47,11): error TS2141: Class 'M.Bar3' cannot extend class 'M.Foo':
!!! 	Types 'Bar3' and 'Foo' define property 'x' as private.
            private x: string;
            y: number;
        }
    }
    
    // two levels of privates
    module M2 {
        class Foo {
            private x: string;
        }
    
        class Baz extends Foo {
            private y: number;
        }
    
        interface I extends Baz {
            z: number;
        }
    
        class Bar extends Foo implements I { // error
              ~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(67,11): error TS2137: Class Bar declares interface I but does not implement it:
!!! 	Type 'Bar' is missing property 'y' from type 'I'.
            z: number;
        }
    
        var b: Bar;
        var r1 = b.z;
        var r2 = b.x; // error
                   ~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(73,16): error TS2107: 'M2.Foo.x' is inaccessible.
        var r3 = b.y; // error
                   ~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(74,16): error TS2094: The property 'y' does not exist on value of type 'Bar'.
    
        class Bar2 extends Foo implements I { // error
              ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2137: Class Bar2 declares interface I but does not implement it:
!!! 	Type 'Bar2' is missing property 'y' from type 'I'.
              ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(76,11): error TS2141: Class 'M2.Bar2' cannot extend class 'M2.Foo':
!!! 	Property 'x' defined as public in type 'Bar2' is defined as private in type 'Foo'.
            x: string;
            z: number;
        }
    
        class Bar3 extends Foo implements I { // error
              ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(81,11): error TS2137: Class Bar3 declares interface I but does not implement it:
!!! 	Type 'Bar3' is missing property 'y' from type 'I'.
              ~~~~
!!! implementingAnInterfaceExtendingClassWithPrivates2.ts(81,11): error TS2141: Class 'M2.Bar3' cannot extend class 'M2.Foo':
!!! 	Types 'Bar3' and 'Foo' define property 'x' as private.
            private x: string;
            z: number;
        }
    }