tests/cases/compiler/baseTypeWrappingInstantiationChain.ts(19,36): error TS2345: Argument of type 'C<T1>' is not assignable to parameter of type 'Parameter<Wrapper<T1>>'.
  Types of property 'method' are incompatible.
    Type '(t: Wrapper<T1>) => void' is not assignable to type '(t: Wrapper<T1>) => void'. Two different types with this name exist, but they are unrelated.
      The 'this' types of each signature are incompatible.
        Type 'Parameter<T4>' is missing the following properties from type 'C<T1>': works, alsoWorks
tests/cases/compiler/baseTypeWrappingInstantiationChain.ts(22,23): error TS2345: Argument of type 'C<T1>' is not assignable to parameter of type 'Parameter<Wrapper<T1>>'.


==== tests/cases/compiler/baseTypeWrappingInstantiationChain.ts (2 errors) ====
    class CBaseBase<T3> {
        constructor(x: Parameter<T3>) { }
    }
    
    class CBase<T2> extends CBaseBase<Wrapper<T2>> {
    
    }
    
    class Parameter<T4> {
        method(t: T4) { }
    }
    
    class Wrapper<T5> {
        property: T5;
    }
    
    class C<T1> extends CBase<T1> {
        public works() {
            new CBaseBase<Wrapper<T1>>(this);
                                       ~~~~
!!! error TS2345: Argument of type 'C<T1>' is not assignable to parameter of type 'Parameter<Wrapper<T1>>'.
!!! error TS2345:   Types of property 'method' are incompatible.
!!! error TS2345:     Type '(t: Wrapper<T1>) => void' is not assignable to type '(t: Wrapper<T1>) => void'. Two different types with this name exist, but they are unrelated.
!!! error TS2345:       The 'this' types of each signature are incompatible.
!!! error TS2345:         Type 'Parameter<T4>' is missing the following properties from type 'C<T1>': works, alsoWorks
        }
        public alsoWorks() {
            new CBase<T1>(this); // Should not error, parameter is of type Parameter<Wrapper<T1>>
                          ~~~~
!!! error TS2345: Argument of type 'C<T1>' is not assignable to parameter of type 'Parameter<Wrapper<T1>>'.
        }
    
        public method(t: Wrapper<T1>) { }
    }
    