{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8098","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8098/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8098/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8098/events","html_url":"https://github.com/Microsoft/TypeScript/issues/8098","id":148460321,"number":8098,"title":"[Transforms] Extra assignment emitted for namespaces in System modules","user":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Domain:%20Transforms","name":"Domain: Transforms","color":"006b75"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Fixed","name":"Fixed","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"sheetalkamat","id":8052792,"avatar_url":"https://avatars.githubusercontent.com/u/8052792?v=3","gravatar_id":"","url":"https://api.github.com/users/sheetalkamat","html_url":"https://github.com/sheetalkamat","followers_url":"https://api.github.com/users/sheetalkamat/followers","following_url":"https://api.github.com/users/sheetalkamat/following{/other_user}","gists_url":"https://api.github.com/users/sheetalkamat/gists{/gist_id}","starred_url":"https://api.github.com/users/sheetalkamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheetalkamat/subscriptions","organizations_url":"https://api.github.com/users/sheetalkamat/orgs","repos_url":"https://api.github.com/users/sheetalkamat/repos","events_url":"https://api.github.com/users/sheetalkamat/events{/privacy}","received_events_url":"https://api.github.com/users/sheetalkamat/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-04-14T19:33:59Z","updated_at":"2016-04-18T16:56:59Z","closed_at":"2016-04-18T16:56:59Z","body":"Notice the `(M = M || (M = {}))` in the output. \r\n\r\n**Expected**:\r\n\r\n```js\r\nSystem.register([], function (exports_1, context_1) {\r\n    \"use strict\";\r\n    var __moduleName = context_1 && context_1.id;\r\n    var M;\r\n    return {\r\n        setters: [],\r\n        execute: function () {\r\n            // filename: instantiatedModule.ts\r\n            (function (M) {\r\n                var x = 1;\r\n            })(M || (M = {}));\r\n            exports_1(\"M\", M);\r\n        }\r\n    };\r\n});\r\n```\r\n\r\n**Actual**:\r\n\r\n```js\r\nSystem.register([], function (exports_1, context_1) {\r\n    \"use strict\";\r\n    var __moduleName = context_1 && context_1.id;\r\n    var M;\r\n    return {\r\n        setters: [],\r\n        execute: function () {\r\n            // filename: instantiatedModule.ts\r\n            (function (M) {\r\n                var x = 1;\r\n            })(M = M || (M = {}));\r\n            exports_1(\"M\", M);\r\n        }\r\n    };\r\n});\r\n```\r\n\r\nFailed tests:\r\n* systemModule7.ts"}}