{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2100","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2100/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2100/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2100/events","html_url":"https://github.com/Microsoft/TypeScript/issues/2100","id":58471237,"number":2100,"title":"Type compatibility of auto-typed object literal is not transitive.","user":{"login":"sccolbert","id":137289,"avatar_url":"https://avatars.githubusercontent.com/u/137289?v=3","gravatar_id":"","url":"https://api.github.com/users/sccolbert","html_url":"https://github.com/sccolbert","followers_url":"https://api.github.com/users/sccolbert/followers","following_url":"https://api.github.com/users/sccolbert/following{/other_user}","gists_url":"https://api.github.com/users/sccolbert/gists{/gist_id}","starred_url":"https://api.github.com/users/sccolbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sccolbert/subscriptions","organizations_url":"https://api.github.com/users/sccolbert/orgs","repos_url":"https://api.github.com/users/sccolbert/repos","events_url":"https://api.github.com/users/sccolbert/events{/privacy}","received_events_url":"https://api.github.com/users/sccolbert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-21T19:21:28Z","updated_at":"2015-02-21T19:21:28Z","closed_at":null,"body":"This example demonstrates the issue (runnable in the playground):\r\n\r\n```typescript\r\ninterface IDict {\r\n\t[key: string]: any;\r\n}\r\n\r\n\r\nfunction foo(dict: IDict): void { }\r\n\r\n\r\nfunction bar(): void {\r\n\tvar data = { one: 1, two: 2 };\r\n\tvar data2: IDict = { one: 1, two: 2 }; // ok\r\n\tvar data3: IDict = data;               // error\r\n\tfoo({ one: 1, two: 2 });               // ok\r\n\tfoo(data2);                            // ok\r\n\tfoo(data);                             // error\r\n}\r\n```\r\n\r\nThe two error lines (imho) should not be errors. The deduced type is in fact compatible with the interface, as indicated by the acceptance of the literal argument to the function `foo`."}}