tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts(25,1): error TS2322: Type 'A<Foo>' is not assignable to type 'A<Bar> | B<Baz> | C<Kwah>'.
  Type 'A<Foo>' is not assignable to type 'A<Bar>'.
    Property 'bar' is missing in type 'Foo' but required in type 'Bar'.
tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts(26,1): error TS2322: Type 'B<Foo>' is not assignable to type 'A<Bar> | B<Baz> | C<Kwah>'.
  Type 'B<Foo>' is not assignable to type 'B<Baz>'.
    Property 'baz' is missing in type 'Foo' but required in type 'Baz'.
tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts(27,1): error TS2322: Type 'C<Foo>' is not assignable to type 'A<Bar> | B<Baz> | C<Kwah>'.
  Type 'C<Foo>' is not assignable to type 'C<Kwah>'.
    Property 'kwah' is missing in type 'Foo' but required in type 'Kwah'.
tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts(48,1): error TS2322: Type 'X<Foo>' is not assignable to type 'X<Bar> | Y<Baz> | Z<Kwah>'.
  Type 'X<Foo>' is not assignable to type 'X<Bar>'.
    Type 'Foo' is not assignable to type 'Bar'.
tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts(49,1): error TS2322: Type 'Y<Foo>' is not assignable to type 'X<Bar> | Y<Baz> | Z<Kwah>'.
  Type 'Y<Foo>' is not assignable to type 'Y<Baz>'.
    Type 'Foo' is not assignable to type 'Baz'.
tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts(50,1): error TS2322: Type 'Z<Foo>' is not assignable to type 'X<Bar> | Y<Baz> | Z<Kwah>'.
  Type 'Z<Foo>' is not assignable to type 'Z<Kwah>'.
    Type 'Foo' is not assignable to type 'Kwah'.


==== tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts (6 errors) ====
    interface Foo { foo: any }
    interface Bar { bar: any }
    interface Baz { baz: any }
    interface Kwah { kwah: any }
    
    ////////
    
    interface A<T> {
        aProp: T;
    }
    
    interface B<T> {
        bProp: T;
    }
    
    interface C<T> {
        cProp: T;
    }
    
    declare const a: A<Foo>;
    declare const b: B<Foo>;
    declare const c: C<Foo>;
    declare let thingOfInterfaces: A<Bar> | B<Baz> | C<Kwah>;
    
    thingOfInterfaces = a;
    ~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'A<Foo>' is not assignable to type 'A<Bar> | B<Baz> | C<Kwah>'.
!!! error TS2322:   Type 'A<Foo>' is not assignable to type 'A<Bar>'.
!!! error TS2322:     Property 'bar' is missing in type 'Foo' but required in type 'Bar'.
!!! related TS2728 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:2:17: 'bar' is declared here.
    thingOfInterfaces = b;
    ~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'B<Foo>' is not assignable to type 'A<Bar> | B<Baz> | C<Kwah>'.
!!! error TS2322:   Type 'B<Foo>' is not assignable to type 'B<Baz>'.
!!! error TS2322:     Property 'baz' is missing in type 'Foo' but required in type 'Baz'.
!!! related TS2728 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:3:17: 'baz' is declared here.
    thingOfInterfaces = c;
    ~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'C<Foo>' is not assignable to type 'A<Bar> | B<Baz> | C<Kwah>'.
!!! error TS2322:   Type 'C<Foo>' is not assignable to type 'C<Kwah>'.
!!! error TS2322:     Property 'kwah' is missing in type 'Foo' but required in type 'Kwah'.
!!! related TS2728 tests/cases/compiler/unionTypeErrorMessageTypeRefs01.ts:4:18: 'kwah' is declared here.
    
    ////////
    
    type X<T> = {
        xProp: T;
    }
    
    type Y<T> = {
        yProp: T;
    }
    
    type Z<T> = {
        zProp: T;
    }
    
    declare const x: X<Foo>;
    declare const y: Y<Foo>;
    declare const z: Z<Foo>;
    declare let thingOfTypeAliases: X<Bar> | Y<Baz> | Z<Kwah>;
    
    thingOfTypeAliases = x;
    ~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'X<Foo>' is not assignable to type 'X<Bar> | Y<Baz> | Z<Kwah>'.
!!! error TS2322:   Type 'X<Foo>' is not assignable to type 'X<Bar>'.
!!! error TS2322:     Type 'Foo' is not assignable to type 'Bar'.
    thingOfTypeAliases = y;
    ~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'Y<Foo>' is not assignable to type 'X<Bar> | Y<Baz> | Z<Kwah>'.
!!! error TS2322:   Type 'Y<Foo>' is not assignable to type 'Y<Baz>'.
!!! error TS2322:     Type 'Foo' is not assignable to type 'Baz'.
    thingOfTypeAliases = z;
    ~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'Z<Foo>' is not assignable to type 'X<Bar> | Y<Baz> | Z<Kwah>'.
!!! error TS2322:   Type 'Z<Foo>' is not assignable to type 'Z<Kwah>'.
!!! error TS2322:     Type 'Foo' is not assignable to type 'Kwah'.