inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts(35,15): error TS2322: Type '{ x: number; }' is not assignable to type 'Assign<T, { x: number; }>'.
  Type '{ x: number; }' is not assignable to type 'Omit<T, "x">'.
inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts(35,59): error TS2769: No overload matches this call.
  Overload 1 of 4, '(target: {}, source: { x: number; }): { x: number; }', gave the following error.
    Argument of type 'T' is not assignable to parameter of type '{}'.
  Overload 2 of 4, '(target: object, ...sources: any[]): any', gave the following error.
    Argument of type 'T' is not assignable to parameter of type 'object'.


==== inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts (2 errors) ====
    // simple example
    export class Test<A, B> {
        constructor(public a: A, public b: B) { }
    
        test<C>(c: C): Test<B, C> {
            return new Test(this.b, c);
        }
    }
    
    // complicated one
    interface Supervisor<out T> {
        zip<A>(right: Supervisor<A>): Supervisor<[T, A]>;
    }
    
    export class Zip<out T0, out T1> implements Supervisor<readonly [T0, T1]> {
        constructor(
            readonly left: Supervisor<T0>,
            readonly right: Supervisor<T1>,
        ) { }
    
        zip<A>(right: Supervisor<A>): Supervisor<[[T0, T1], A]> {
            return new Zip(this, right);
        }
    }
    
    // indirect
    type Assign<T, U> = Omit<T, keyof U> & U;
    
    class Base<T> {
        constructor(public t: T) { }
    }
    
    export class Foo<T> extends Base<T> {
        update(): Foo<Assign<T, { x: number }>> {
            const v: Assign<T, { x: number }> = Object.assign(this.t, { x: 1 });
                  ~
!!! error TS2322: Type '{ x: number; }' is not assignable to type 'Assign<T, { x: number; }>'.
!!! error TS2322:   Type '{ x: number; }' is not assignable to type 'Omit<T, "x">'.
                                                              ~~~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 4, '(target: {}, source: { x: number; }): { x: number; }', gave the following error.
!!! error TS2769:     Argument of type 'T' is not assignable to parameter of type '{}'.
!!! error TS2769:   Overload 2 of 4, '(target: object, ...sources: any[]): any', gave the following error.
!!! error TS2769:     Argument of type 'T' is not assignable to parameter of type 'object'.
!!! related TS2208 inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts:33:18: This type parameter might need an `extends {}` constraint.
!!! related TS2208 inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts:33:18: This type parameter might need an `extends object` constraint.
            return new Foo(v);
        }
    }