=== tests/cases/conformance/expressions/contextualTyping/objectLiteralContextualTyping.ts ===
// In a contextually typed object literal, each property value expression is contextually typed by
//      the type of the property with a matching name in the contextual type, if any, or otherwise
//      for a numerically named property, the numeric index type of the contextual type, if any, or otherwise
//      the string index type of the contextual type, if any.

interface Item {
>Item : Symbol(Item, Decl(objectLiteralContextualTyping.ts, 0, 0))

    name: string;
>name : Symbol(name, Decl(objectLiteralContextualTyping.ts, 5, 16))

    description?: string;
>description : Symbol(description, Decl(objectLiteralContextualTyping.ts, 6, 17))
}

declare function foo(item: Item): string;
>foo : Symbol(foo, Decl(objectLiteralContextualTyping.ts, 8, 1), Decl(objectLiteralContextualTyping.ts, 10, 41))
>item : Symbol(item, Decl(objectLiteralContextualTyping.ts, 10, 21))
>Item : Symbol(Item, Decl(objectLiteralContextualTyping.ts, 0, 0))

declare function foo(item: any): number;
>foo : Symbol(foo, Decl(objectLiteralContextualTyping.ts, 8, 1), Decl(objectLiteralContextualTyping.ts, 10, 41))
>item : Symbol(item, Decl(objectLiteralContextualTyping.ts, 11, 21))

var x = foo({ name: "Sprocket" });
>x : Symbol(x, Decl(objectLiteralContextualTyping.ts, 13, 3), Decl(objectLiteralContextualTyping.ts, 14, 3))
>foo : Symbol(foo, Decl(objectLiteralContextualTyping.ts, 8, 1), Decl(objectLiteralContextualTyping.ts, 10, 41))
>name : Symbol(name, Decl(objectLiteralContextualTyping.ts, 13, 13))

var x: string;
>x : Symbol(x, Decl(objectLiteralContextualTyping.ts, 13, 3), Decl(objectLiteralContextualTyping.ts, 14, 3))

var y = foo({ name: "Sprocket", description: "Bumpy wheel" });
>y : Symbol(y, Decl(objectLiteralContextualTyping.ts, 16, 3), Decl(objectLiteralContextualTyping.ts, 17, 3))
>foo : Symbol(foo, Decl(objectLiteralContextualTyping.ts, 8, 1), Decl(objectLiteralContextualTyping.ts, 10, 41))
>name : Symbol(name, Decl(objectLiteralContextualTyping.ts, 16, 13))
>description : Symbol(description, Decl(objectLiteralContextualTyping.ts, 16, 31))

var y: string;
>y : Symbol(y, Decl(objectLiteralContextualTyping.ts, 16, 3), Decl(objectLiteralContextualTyping.ts, 17, 3))

var z = foo({ name: "Sprocket", description: false });
>z : Symbol(z, Decl(objectLiteralContextualTyping.ts, 19, 3), Decl(objectLiteralContextualTyping.ts, 20, 3))
>foo : Symbol(foo, Decl(objectLiteralContextualTyping.ts, 8, 1), Decl(objectLiteralContextualTyping.ts, 10, 41))
>name : Symbol(name, Decl(objectLiteralContextualTyping.ts, 19, 13))
>description : Symbol(description, Decl(objectLiteralContextualTyping.ts, 19, 31))

var z: number;
>z : Symbol(z, Decl(objectLiteralContextualTyping.ts, 19, 3), Decl(objectLiteralContextualTyping.ts, 20, 3))

var w = foo({ a: 10 });
>w : Symbol(w, Decl(objectLiteralContextualTyping.ts, 22, 3), Decl(objectLiteralContextualTyping.ts, 23, 3))
>foo : Symbol(foo, Decl(objectLiteralContextualTyping.ts, 8, 1), Decl(objectLiteralContextualTyping.ts, 10, 41))
>a : Symbol(a, Decl(objectLiteralContextualTyping.ts, 22, 13))

var w: number;
>w : Symbol(w, Decl(objectLiteralContextualTyping.ts, 22, 3), Decl(objectLiteralContextualTyping.ts, 23, 3))

declare function bar<T>(param: { x?: T }): T;
>bar : Symbol(bar, Decl(objectLiteralContextualTyping.ts, 23, 14))
>T : Symbol(T, Decl(objectLiteralContextualTyping.ts, 25, 21))
>param : Symbol(param, Decl(objectLiteralContextualTyping.ts, 25, 24))
>x : Symbol(x, Decl(objectLiteralContextualTyping.ts, 25, 32))
>T : Symbol(T, Decl(objectLiteralContextualTyping.ts, 25, 21))
>T : Symbol(T, Decl(objectLiteralContextualTyping.ts, 25, 21))

var b = bar({});
>b : Symbol(b, Decl(objectLiteralContextualTyping.ts, 27, 3), Decl(objectLiteralContextualTyping.ts, 28, 3))
>bar : Symbol(bar, Decl(objectLiteralContextualTyping.ts, 23, 14))

var b: {};
>b : Symbol(b, Decl(objectLiteralContextualTyping.ts, 27, 3), Decl(objectLiteralContextualTyping.ts, 28, 3))

