Title: "Remove unreachable code" fix removes too much · Issue #25592 · microsoft/TypeScript · GitHub
Open Graph Title: "Remove unreachable code" fix removes too much · Issue #25592 · microsoft/TypeScript
X Title: "Remove unreachable code" fix removes too much · Issue #25592 · microsoft/TypeScript
Description: TypeScript Version: 2.9.1, 3.0-rc Search Terms: unreachable remove fix Code while (true) { console.log(1); break; console.log(2); // unreachable } Expected behavior: "Remove unreachable code" fix should only remove the code after "break"...
Open Graph Description: TypeScript Version: 2.9.1, 3.0-rc Search Terms: unreachable remove fix Code while (true) { console.log(1); break; console.log(2); // unreachable } Expected behavior: "Remove unreachable code" fix s...
X Description: TypeScript Version: 2.9.1, 3.0-rc Search Terms: unreachable remove fix Code while (true) { console.log(1); break; console.log(2); // unreachable } Expected behavior: "Remove unreachable code&q...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/25592
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Remove unreachable code\" fix removes too much","articleBody":"**TypeScript Version:** 2.9.1, 3.0-rc\r\n\r\n**Search Terms:** unreachable remove fix\r\n\r\n**Code**\r\n```ts\r\nwhile (true) {\r\n console.log(1);\r\n break;\r\n console.log(2); // unreachable\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\n\"Remove unreachable code\" fix should only remove the code after \"break\".\r\n\r\n**Actual behavior:**\r\nThe fix removes the whole loop.\r\n\r\nI guess the idea was that the body of an `if (false)` or `while (false)` is considered unreachable, and in that case the whole thing can be removed. But, that's not the case here.","author":{"url":"https://github.com/jeffreymorlan","@type":"Person","name":"jeffreymorlan"},"datePublished":"2018-07-11T23:30:53Z","url":"https://github.com/microsoft/TypeScript/issues/25592"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6aecc3cc-afb7-4a44-19ee-777b2e6feb6a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C1BA:38EE04:439804:596AD7:6B019794 |
| html-safe-nonce | e28bcfe9ec25b748c587b2c850b2e377138620839f9bd6ff7b869dff75ee2535 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUJBOjM4RUUwNDo0Mzk4MDQ6NTk2QUQ3OjZCMDE5Nzk0IiwidmlzaXRvcl9pZCI6IjQ1NDI1MTM5MTQwNjMxOTgxMDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cf711a13b1adbb8dd5b00c5a294a8c34a11e94b00194879c8a40f9141d5b47eb |
| hovercard-subject-tag | issue:340440216 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/25592/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ff30c8226f0f11c41965735ae643f2f75b5b28ea2477fb255f3b4df685dd89ae/microsoft/TypeScript/issues/25592 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ff30c8226f0f11c41965735ae643f2f75b5b28ea2477fb255f3b4df685dd89ae/microsoft/TypeScript/issues/25592 |
| og:image:alt | TypeScript Version: 2.9.1, 3.0-rc Search Terms: unreachable remove fix Code while (true) { console.log(1); break; console.log(2); // unreachable } Expected behavior: "Remove unreachable code" fix s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jeffreymorlan |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width