tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(18,3): error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Foo | Other'.
  Type '{ a: string; b: string; }' is not assignable to type 'Foo'.
    Types of property 'b' are incompatible.
      Type 'string' is not assignable to type 'number'.
tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(19,3): error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Foo | Other'.
  Type '{ a: string; b: string; }' is not assignable to type 'Foo'.
    Types of property 'b' are incompatible.
      Type 'string' is not assignable to type 'number'.
tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts(24,5): error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Bar | Other'.
  Object literal may only specify known properties, and 'a' does not exist in type 'Bar | Other'.


==== tests/cases/compiler/errorsOnUnionsOfOverlappingObjects01.ts (3 errors) ====
    interface Foo {
        a: string;
        b: number;
    };
    
    interface Bar {
        b: string;
    }
    
    interface Other {
        totallyUnrelatedProperty: number;
    }
    
    export let x = { a: '', b: '' };
    
    declare function f(x: Foo | Other): any;
    
    f(x);
      ~
!!! error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Foo | Other'.
!!! error TS2345:   Type '{ a: string; b: string; }' is not assignable to type 'Foo'.
!!! error TS2345:     Types of property 'b' are incompatible.
!!! error TS2345:       Type 'string' is not assignable to type 'number'.
    f({ a: '', b: '' })
      ~~~~~~~~~~~~~~~~
!!! error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Foo | Other'.
!!! error TS2345:   Type '{ a: string; b: string; }' is not assignable to type 'Foo'.
!!! error TS2345:     Types of property 'b' are incompatible.
!!! error TS2345:       Type 'string' is not assignable to type 'number'.
    
    declare function g(x: Bar | Other): any;
    
    g(x);
    g({ a: '', b: '' })
        ~~~~~
!!! error TS2345: Argument of type '{ a: string; b: string; }' is not assignable to parameter of type 'Bar | Other'.
!!! error TS2345:   Object literal may only specify known properties, and 'a' does not exist in type 'Bar | Other'.
    
    declare function h(x: Foo | Bar | Other): any;
    
    h(x);
    h({ a: '', b: '' })
    