{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6428","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6428/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6428/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6428/events","html_url":"https://github.com/Microsoft/TypeScript/issues/6428","id":125798341,"number":6428,"title":"TypeError: Cannot read property 'declarations' of undefined","user":{"login":"andy-hanson","id":5387404,"avatar_url":"https://avatars.githubusercontent.com/u/5387404?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-hanson","html_url":"https://github.com/andy-hanson","followers_url":"https://api.github.com/users/andy-hanson/followers","following_url":"https://api.github.com/users/andy-hanson/following{/other_user}","gists_url":"https://api.github.com/users/andy-hanson/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-hanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-hanson/subscriptions","organizations_url":"https://api.github.com/users/andy-hanson/orgs","repos_url":"https://api.github.com/users/andy-hanson/repos","events_url":"https://api.github.com/users/andy-hanson/events{/privacy}","received_events_url":"https://api.github.com/users/andy-hanson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-10T04:08:25Z","updated_at":"2016-01-10T04:08:25Z","closed_at":null,"body":"The following code (in file `Foo.ts`) causes the compiler to crash:\r\n\r\n\timport Foo From './Foo'\r\n\texport default Foo\r\n\r\n(Yes, that's a capitalized `From` and it tries to export itself.)\r\n\r\nThe error is:\r\n\r\n\tTypeError: Cannot read property 'declarations' of undefined\r\n\t    at /home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:13033:58\r\n\t    at Object.forEach (/home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:98:30)\r\n\t    at buildVisibleNodeList (/home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:13023:20)\r\n\t    at Object.collectLinkedAliases (/home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:13019:17)\r\n\t    at emitExportAssignment (/home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:24594:38)\r\n\t    at emitNode (/home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:25513:28)\r\n\t    at emitLines (/home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:24406:17)\r\n\t    at emitSourceFile (/home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:24558:13)\r\n\t    at /home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:24242:17\r\n\t    at Object.forEach (/home/andy/git/TYPESCRIPT/node_modules/typescript/lib/tsc.js:98:30)\r\n\r\nTested on typescript `1.8.0-dev.20160109`.\r\n"}}