{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8686","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8686/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8686/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8686/events","html_url":"https://github.com/Microsoft/TypeScript/issues/8686","id":155727324,"number":8686,"title":"strictNullChecks triggers \"Variable used before being assigned\" when tuple destructuring is used in function parameters","user":{"login":"ntrrgc","id":1002436,"avatar_url":"https://avatars.githubusercontent.com/u/1002436?v=3","gravatar_id":"","url":"https://api.github.com/users/ntrrgc","html_url":"https://github.com/ntrrgc","followers_url":"https://api.github.com/users/ntrrgc/followers","following_url":"https://api.github.com/users/ntrrgc/following{/other_user}","gists_url":"https://api.github.com/users/ntrrgc/gists{/gist_id}","starred_url":"https://api.github.com/users/ntrrgc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntrrgc/subscriptions","organizations_url":"https://api.github.com/users/ntrrgc/orgs","repos_url":"https://api.github.com/users/ntrrgc/repos","events_url":"https://api.github.com/users/ntrrgc/events{/privacy}","received_events_url":"https://api.github.com/users/ntrrgc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Needs%20More%20Info","name":"Needs More Info","color":"556b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-19T12:42:19Z","updated_at":"2016-05-19T16:19:50Z","closed_at":null,"body":"**TypeScript Version:** \r\n\r\nnightly (1.9.0-dev.20160519)\r\n\r\n**Code**\r\n\r\n```ts\r\n// A self-contained demonstration of the problem follows...\r\nfunction test(callback: (tuple: [number, number]) => number) {\r\n    return callback([1, 2]);\r\n}\r\n\r\nconsole.log(test(([a, b]) => a + b));\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nIt should always compile without errors.\r\n\r\n**Actual behavior:** \r\n\r\nWhen `strictNullChecks` is on the following error is raised.\r\n```\r\nError:(5, 30) TS2454: Variable 'a' is used before being assigned.\r\nError:(5, 34) TS2454: Variable 'b' is used before being assigned.\r\n```\r\nObviously it's wrong, as both `a` and `b` are passed as parameters. The signature of `callback` guarantees they have been assigned by the caller."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/220376499","html_url":"https://github.com/Microsoft/TypeScript/issues/8686#issuecomment-220376499","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8686","id":220376499,"user":{"login":"ahejlsberg","id":4226954,"avatar_url":"https://avatars.githubusercontent.com/u/4226954?v=3","gravatar_id":"","url":"https://api.github.com/users/ahejlsberg","html_url":"https://github.com/ahejlsberg","followers_url":"https://api.github.com/users/ahejlsberg/followers","following_url":"https://api.github.com/users/ahejlsberg/following{/other_user}","gists_url":"https://api.github.com/users/ahejlsberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ahejlsberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahejlsberg/subscriptions","organizations_url":"https://api.github.com/users/ahejlsberg/orgs","repos_url":"https://api.github.com/users/ahejlsberg/repos","events_url":"https://api.github.com/users/ahejlsberg/events{/privacy}","received_events_url":"https://api.github.com/users/ahejlsberg/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T16:19:50Z","updated_at":"2016-05-19T16:19:50Z","body":"I just tried the repro and I can't reproduce the problem. I compiles with no errors with a fresh install of nightly build 1.9.0-dev.20160519-1.0."}}