tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(18,19): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(19,31): error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'A'.
  Object literal may only specify known properties, and 'y' does not exist in type 'A'.
tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(22,19): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(23,31): error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'A'.
  Object literal may only specify known properties, and 'y' does not exist in type 'A'.
tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(34,5): error TS2322: Type '{ id: number; url: string; xyz: number; }' is not assignable to type '{ id: number; } & { url: string; }'.
  Object literal may only specify known properties, and 'xyz' does not exist in type '{ id: number; } & { url: string; }'.
tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(43,9): error TS2322: Type '{ id: number; url: string; xyz: number; }' is not assignable to type '{ id: number; } & { url: string; }'.
  Object literal may only specify known properties, and 'xyz' does not exist in type '{ id: number; } & { url: string; }'.
tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(68,32): error TS2322: Type '{ foo: true; bar: true; boo: boolean; }' is not assignable to type 'View<TypeA>'.
  Object literal may only specify known properties, and 'boo' does not exist in type 'View<TypeA>'.
tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts(70,50): error TS2322: Type '{ foo: true; bar: true; boo: true; }' is not assignable to type 'boolean | View<TypeB>'.
  Object literal may only specify known properties, and 'boo' does not exist in type 'View<TypeB>'.


==== tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts (8 errors) ====
    // https://github.com/Microsoft/TypeScript/issues/13813
    
    interface A {
        x: string
    }
    
    interface B {
        a: A;
    }
    
    interface C {
        c: number;
    }
    
    type D = B & C;
    
    let a: B = { a: { x: 'hello' } }; // ok
    let b: B = { a: { x: 2 } }; // error - types of property x are incompatible
                      ~
!!! error TS2322: Type 'number' is not assignable to type 'string'.
!!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:4:5: The expected type comes from property 'x' which is declared here on type 'A'
    let c: B = { a: { x: 'hello', y: 2 } }; // error - y does not exist in type A
                                  ~~~~
!!! error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'A'.
!!! error TS2322:   Object literal may only specify known properties, and 'y' does not exist in type 'A'.
!!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:8:5: The expected type comes from property 'a' which is declared here on type 'B'
    
    let d: D = { a: { x: 'hello' }, c: 5 }; // ok
    let e: D = { a: { x: 2 }, c: 5 }; // error - types of property x are incompatible
                      ~
!!! error TS2322: Type 'number' is not assignable to type 'string'.
!!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:4:5: The expected type comes from property 'x' which is declared here on type 'A'
    let f: D = { a: { x: 'hello', y: 2 }, c: 5 }; // error - y does not exist in type A
                                  ~~~~
!!! error TS2322: Type '{ x: string; y: number; }' is not assignable to type 'A'.
!!! error TS2322:   Object literal may only specify known properties, and 'y' does not exist in type 'A'.
!!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:8:5: The expected type comes from property 'a' which is declared here on type 'D'
    
    // https://github.com/Microsoft/TypeScript/issues/18075
    
    export type MyType = { id: number; } & { name: string; } & { photo: { id: number; } & { url: string; } }
    
    export let obj: MyType;
    
    export const photo: typeof obj.photo = {
        id: 1,
        url: '',
        xyz: 1 // Great! This causes an error!
        ~~~~~~
!!! error TS2322: Type '{ id: number; url: string; xyz: number; }' is not assignable to type '{ id: number; } & { url: string; }'.
!!! error TS2322:   Object literal may only specify known properties, and 'xyz' does not exist in type '{ id: number; } & { url: string; }'.
    };
    
    export const myInstance: MyType = {
        id: 1,
        name: '',
        photo: {
            id: 1,
            url: '',
            xyz: 2 // This should also be an error
            ~~~~~~
!!! error TS2322: Type '{ id: number; url: string; xyz: number; }' is not assignable to type '{ id: number; } & { url: string; }'.
!!! error TS2322:   Object literal may only specify known properties, and 'xyz' does not exist in type '{ id: number; } & { url: string; }'.
!!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:27:62: The expected type comes from property 'photo' which is declared here on type 'MyType'
        }
    };
    
    // https://github.com/Microsoft/TypeScript/issues/28616
    
    export type View<T> = { [K in keyof T]: T[K] extends object ? boolean | View<T[K]> : boolean };
    
    interface TypeC {
        foo: string;
        bar: string;
    }
    
    interface TypeB {
        foo: string,
        bar: TypeC
    }
    
    interface TypeA {
        foo: string,
        bar: TypeB,
    }
    
    let test: View<TypeA>;
    
    test = { foo: true, bar: true, boo: true }
                                   ~~~~~~~~~
!!! error TS2322: Type '{ foo: true; bar: true; boo: boolean; }' is not assignable to type 'View<TypeA>'.
!!! error TS2322:   Object literal may only specify known properties, and 'boo' does not exist in type 'View<TypeA>'.
    
    test = { foo: true, bar: { foo: true, bar: true, boo: true } }
                                                     ~~~~~~~~~
!!! error TS2322: Type '{ foo: true; bar: true; boo: true; }' is not assignable to type 'boolean | View<TypeB>'.
!!! error TS2322:   Object literal may only specify known properties, and 'boo' does not exist in type 'View<TypeB>'.
!!! related TS6500 tests/cases/compiler/excessPropertyChecksWithNestedIntersections.ts:63:5: The expected type comes from property 'bar' which is declared here on type 'View<TypeA>'
    