tests/cases/compiler/interfaceClassMerging2.ts(10,9): error TS2322: Type 'Foo' is not assignable to type 'this'.
  'Foo' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Foo'.
tests/cases/compiler/interfaceClassMerging2.ts(24,9): error TS2322: Type 'Bar' is not assignable to type 'this'.
  'Bar' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Bar'.


==== tests/cases/compiler/interfaceClassMerging2.ts (2 errors) ====
    interface Foo {
        interfaceFooMethod(): this;
        interfaceFooProperty: this;
    }
    
    class Foo {
        classFooProperty: this;
    
        classFooMethod(): this {
            return this;
            ~~~~~~~~~~~~
!!! error TS2322: Type 'Foo' is not assignable to type 'this'.
!!! error TS2322:   'Foo' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Foo'.
        }
    }
    
    
    interface Bar {
        interfaceBarMethod(): this;
        interfaceBarProperty: this;
    }
    
    class Bar extends Foo {
        classBarProperty: this;
    
        classBarMethod(): this {
            return this;
            ~~~~~~~~~~~~
!!! error TS2322: Type 'Bar' is not assignable to type 'this'.
!!! error TS2322:   'Bar' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'Bar'.
        }
    }
    
    
    var bar = new Bar();
    bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod();
    
    
    var foo = new Foo();
    
    foo = bar;
    