tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(7,14): error TS2322: Type 'number' is not assignable to type 'string | undefined'.
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(8,1): error TS2322: Type '{ b: string; }' is not assignable to type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'.
  Type '{ b: string; }' is missing the following properties from type '{ a: number; b: string; c: boolean; }': a, c
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(9,1): error TS2322: Type '{ c: true; }' is not assignable to type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'.
  Type '{ c: true; }' is missing the following properties from type '{ a: number; b: string; c: boolean; }': a, b
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(17,1): error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: number; b: number; } | { a: string; b?: undefined; } | { a?: undefined; b?: undefined; }'.
  Type '{ a: string; b: number; }' is not assignable to type '{ a?: undefined; b?: undefined; }'.
    Types of property 'a' are incompatible.
      Type 'string' is not assignable to type 'undefined'.
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(18,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ a: number; b: number; } | { a: string; b?: undefined; } | { a?: undefined; b?: undefined; }'.
  Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: number; }'.
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(48,20): error TS2322: Type '2' is not assignable to type '1'.
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(49,14): error TS2322: Type '2' is not assignable to type '1'.


==== tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts (7 errors) ====
    // Object literals in unions are normalized upon widening
    let a1 = [{ a: 0 }, { a: 1, b: "x" }, { a: 2, b: "y", c: true }][0];
    a1.a;  // number
    a1.b;  // string | undefined
    a1.c;  // boolean | undefined
    a1 = { a: 1 };
    a1 = { a: 0, b: 0 };  // Error
                 ~
!!! error TS2322: Type 'number' is not assignable to type 'string | undefined'.
!!! related TS6500 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47: The expected type comes from property 'b' which is declared here on type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'
    a1 = { b: "y" };  // Error
    ~~
!!! error TS2322: Type '{ b: string; }' is not assignable to type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'.
!!! error TS2322:   Type '{ b: string; }' is missing the following properties from type '{ a: number; b: string; c: boolean; }': a, c
    a1 = { c: true };  // Error
    ~~
!!! error TS2322: Type '{ c: true; }' is not assignable to type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'.
!!! error TS2322:   Type '{ c: true; }' is missing the following properties from type '{ a: number; b: string; c: boolean; }': a, b
    
    let a2 = [{ a: 1, b: 2 }, { a: "abc" }, {}][0];
    a2.a;  // string | number | undefined
    a2.b;  // number | undefined
    a2 = { a: 10, b: 20 };
    a2 = { a: "def" };
    a2 = {};
    a2 = { a: "def", b: 20 };  // Error
    ~~
!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: number; b: number; } | { a: string; b?: undefined; } | { a?: undefined; b?: undefined; }'.
!!! error TS2322:   Type '{ a: string; b: number; }' is not assignable to type '{ a?: undefined; b?: undefined; }'.
!!! error TS2322:     Types of property 'a' are incompatible.
!!! error TS2322:       Type 'string' is not assignable to type 'undefined'.
    a2 = { a: 1 };  // Error
    ~~
!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ a: number; b: number; } | { a: string; b?: undefined; } | { a?: undefined; b?: undefined; }'.
!!! error TS2322:   Property 'b' is missing in type '{ a: number; }' but required in type '{ a: number; b: number; }'.
!!! related TS2728 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:11:19: 'b' is declared here.
    
    // Object literals containing spreads are not normalized
    declare let b1: { a: string, b: string } | { b: string, c: string };
    let b2 = { ...b1, z: 55 };
    let b3 = { ...b2 };
    
    // Before widening {} acts like { [x: string]: undefined }, which is a
    // subtype of types with all optional properties
    declare let opts: { foo?: string, bar?: string, baz?: boolean };
    let c1 = !true ? {} : opts;
    let c2 = !true ? opts : {};
    let c3 = !true ? { a: 0, b: 0 } : {};
    let c4 = !true ? {} : { a: 0, b: 0 };
    
    // Normalization applies to nested properties
    let d1 = [{ kind: 'a', pos: { x: 0, y: 0 } }, { kind: 'b', pos: !true ? { a: "x" } : { b: 0 } }][0];
    d1.kind;
    d1.pos;
    d1.pos.x;
    d1.pos.y;
    d1.pos.a;
    d1.pos.b;
    
    declare function f<T>(...items: T[]): T;
    declare let data: { a: 1, b: "abc", c: true };
    
    // Object literals are inferred as a single normalized union type
    let e1 = f({ a: 1, b: 2 }, { a: "abc" }, {});
    let e2 = f({}, { a: "abc" }, { a: 1, b: 2 });
    let e3 = f(data, { a: 2 });
                       ~
!!! error TS2322: Type '2' is not assignable to type '1'.
!!! related TS6500 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:43:21: The expected type comes from property 'a' which is declared here on type '{ a: 1; b: "abc"; c: true; }'
    let e4 = f({ a: 2 }, data);
                 ~
!!! error TS2322: Type '2' is not assignable to type '1'.
!!! related TS6500 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:43:21: The expected type comes from property 'a' which is declared here on type '{ a: 1; b: "abc"; c: true; }'
    