Title: Convert to ES6 Class Refactoring fails with empty catch clause · Issue #18541 · microsoft/TypeScript · GitHub
Open Graph Title: Convert to ES6 Class Refactoring fails with empty catch clause · Issue #18541 · microsoft/TypeScript
X Title: Convert to ES6 Class Refactoring fails with empty catch clause · Issue #18541 · microsoft/TypeScript
Description: TypeScript Version: nightly (2.6.0-dev.20170916) Try the refactoring on the following code: Code function MyClass() { } MyClass.prototype.foo = function() { try { doStuff(); } catch(e) {} } Expected behavior: The code is refactored Actua...
Open Graph Description: TypeScript Version: nightly (2.6.0-dev.20170916) Try the refactoring on the following code: Code function MyClass() { } MyClass.prototype.foo = function() { try { doStuff(); } catch(e) {} } Expecte...
X Description: TypeScript Version: nightly (2.6.0-dev.20170916) Try the refactoring on the following code: Code function MyClass() { } MyClass.prototype.foo = function() { try { doStuff(); } catch(e) {} } Expecte...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/18541
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Convert to ES6 Class Refactoring fails with empty catch clause","articleBody":"**TypeScript Version:** nightly (2.6.0-dev.20170916)\r\n\r\nTry the refactoring on the following code:\r\n**Code**\r\n\r\n```js\r\nfunction MyClass() {\r\n}\r\nMyClass.prototype.foo = function() {\r\n try { doStuff(); } catch(e) {}\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nThe code is refactored\r\n\r\n**Actual behavior:**\r\nTypescript throws an Error:\r\n```\r\n[Error - 11:06:40] 'getEditsForRefactor' request failed with error.\r\nError processing request. Debug Failure. False expression.\r\nError: Debug Failure. False expression.\r\n at getPos (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:72918:22)\r\n at assignPositionsToNodeArray (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73354:29)\r\n at Object.visitEachChild (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:43020:45)\r\n at assignPositionsToNode (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73342:30)\r\n at visitNode (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:42792:23)\r\n at Object.visitEachChild (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:43052:43)\r\n at assignPositionsToNode (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73342:30)\r\n at Object.visitNodes (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:42829:48)\r\n at assignPositionsToNodeArray (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73349:30)\r\n at Object.visitEachChild (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:43020:45)\r\n at assignPositionsToNode (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73342:30)\r\n at visitNode (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:42792:23)\r\n at visitFunctionBody (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:42875:23)\r\n at Object.visitEachChild (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:42914:510)\r\n at assignPositionsToNode (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73342:30)\r\n at Object.visitNodes (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:42829:48)\r\n at assignPositionsToNodeArray (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73349:30)\r\n at Object.visitEachChild (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:43060:355)\r\n at assignPositionsToNode (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73342:30)\r\n at getNonformattedText (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73318:52)\r\n at ChangeTracker.getFormattedTextOfNode (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73285:40)\r\n at ChangeTracker.computeNewText (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73279:33)\r\n at c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73254:44\r\n at Map.forEach (native)\r\n at ChangeTracker.getChanges (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73247:32)\r\n at Object.getEditsForAction (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:75033:42)\r\n at Object.getEditsForRefactor (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:73512:41)\r\n at Object.getEditsForRefactor (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:77543:32)\r\n at IOSession.Session.getEditsForRefactor (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:83445:59)\r\n at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:82407:61)\r\n at c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:83622:88\r\n at IOSession.Session.executeWithRequestId (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:83613:28)\r\n at IOSession.Session.executeCommand (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:83622:33)\r\n at IOSession.Session.onMessage (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:83642:35)\r\n at Interface.\u003canonymous> (c:\\GitTF\\Aktuell\\WebDispo\\node_modules\\typescript\\lib\\tsserver.js:84789:27)\r\n at emitOne (events.js:96:13)\r\n at Interface.emit (events.js:191:7)\r\n at Interface._onLine (readline.js:241:10)\r\n at Interface._normalWrite (readline.js:384:12)\r\n at Socket.ondata (readline.js:101:10)\r\n at emitOne (events.js:96:13)\r\n at Socket.emit (events.js:191:7)\r\n at readableAddChunk (_stream_readable.js:178:18)\r\n at Socket.Readable.push (_stream_readable.js:136:10)\r\n at Pipe.onread (net.js:560:20)\r\n```\r\n\r\n@andy-ms this sounds very similar to #18437 which you fixed last week.\r\n","author":{"url":"https://github.com/hbenl","@type":"Person","name":"hbenl"},"datePublished":"2017-09-18T09:10:47Z","url":"https://github.com/microsoft/TypeScript/issues/18541"}
| 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:5e454c41-e69a-69d1-9bbd-bd414f6bfeca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E28:882E2:DBA0F3:122F4E4:6B00F8AF |
| html-safe-nonce | 106c88ebb0902de1cc2120a6ae2e30b4251f365edb874e7cb523ad685180c31c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTI4Ojg4MkUyOkRCQTBGMzoxMjJGNEU0OjZCMDBGOEFGIiwidmlzaXRvcl9pZCI6IjQwODMyMTkzNTQxOTg1Mzg0MTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fb2f6d9ec7c6e2d4f51d467702d1c231a36fca780b3c778244fa08cf7b9498bf |
| hovercard-subject-tag | issue:258412187 |
| 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/18541/issue_layout |
| twitter:image | https://opengraph.githubassets.com/609404c9e4a25320a144b6b371defe675bbe98c854096b96e76b8b6054e258c7/microsoft/TypeScript/issues/18541 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/609404c9e4a25320a144b6b371defe675bbe98c854096b96e76b8b6054e258c7/microsoft/TypeScript/issues/18541 |
| og:image:alt | TypeScript Version: nightly (2.6.0-dev.20170916) Try the refactoring on the following code: Code function MyClass() { } MyClass.prototype.foo = function() { try { doStuff(); } catch(e) {} } Expecte... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hbenl |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| 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 | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width