Title: Crash when typedef references a jsdoc-style inner-class namepath · Issue #25104 · microsoft/TypeScript · GitHub
Open Graph Title: Crash when typedef references a jsdoc-style inner-class namepath · Issue #25104 · microsoft/TypeScript
X Title: Crash when typedef references a jsdoc-style inner-class namepath · Issue #25104 · microsoft/TypeScript
Description: From discussion on a bug with related symptoms. class C { /** * @typedef {C~A} C~B * @typedef {object} C~A */ /** @param {C~A} o */ constructor(o) { } } Expected behavior: No crash, although o: any because we don't parse namepaths. Actua...
Open Graph Description: From discussion on a bug with related symptoms. class C { /** * @typedef {C~A} C~B * @typedef {object} C~A */ /** @param {C~A} o */ constructor(o) { } } Expected behavior: No crash, although o: any...
X Description: From discussion on a bug with related symptoms. class C { /** * @typedef {C~A} C~B * @typedef {object} C~A */ /** @param {C~A} o */ constructor(o) { } } Expected behavior: No crash, although o: any...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/25104
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash when typedef references a jsdoc-style inner-class namepath","articleBody":"From [discussion on a bug with related symptoms](https://github.com/Microsoft/TypeScript/issues/22702#issuecomment-398871461).\r\n\r\n```js\r\nclass C {\r\n /**\r\n * @typedef {C~A} C~B\r\n * @typedef {object} C~A\r\n */\r\n /** @param {C~A} o */\r\n constructor(o) {\r\n }\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nNo crash, although `o: any` because we don't parse namepaths.\r\n\r\n**Actual behavior:**\r\n\r\n```\r\n return node.kind === 71 /* Identifier */;\r\n ^\r\n\r\nTypeError: Cannot read property 'kind' of undefined\r\n at Object.isIdentifier (/home/nathansa/ts/built/local/tsc.js:12193:21)\r\n at getDeclarationIdentifier (/home/nathansa/ts/built/local/tsc.js:11954:19)\r\n at nameForNamelessJSDocTypedef (/home/nathansa/ts/built/local/tsc.js:11916:20)\r\n at getNameOfJSDocTypedef (/home/nathansa/ts/built/local/tsc.js:11957:36)\r\n at Object.getNameOfDeclaration (/home/nathansa/ts/built/local/tsc.js:12002:24)\r\n at Object.hasDynamicName (/home/nathansa/ts/built/local/tsc.js:9844:23)\r\n at declareSymbol (/home/nathansa/ts/built/local/tsc.js:25659:33)\r\n at bindBlockScopedDeclaration (/home/nathansa/ts/built/local/tsc.js:26949:21)\r\n at delayedBindJSDocTypedefTag (/home/nathansa/ts/built/local/tsc.js:26974:21)\r\n at bindSourceFile (/home/nathansa/ts/built/local/tsc.js:25532:17)\r\n```","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2018-06-20T20:25:10Z","url":"https://github.com/microsoft/TypeScript/issues/25104"}
| 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:55abf6fd-91d8-521a-dc86-7addd9743ea1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9870:3B66A7:4DFF1F:67A3C6:6B0179A8 |
| html-safe-nonce | 97c3b4d14d98646360ce8cdfc9b6582186b0e9a973ad96bf684ddcbeec79237a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODcwOjNCNjZBNzo0REZGMUY6NjdBM0M2OjZCMDE3OUE4IiwidmlzaXRvcl9pZCI6IjkwMTIyMjQ5MzA5MTMyODY1NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 95037ed003b9469580a5e3a712e242e77e9e5eb7d0406a13d5b0262c12282f39 |
| hovercard-subject-tag | issue:334236150 |
| 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/25104/issue_layout |
| twitter:image | https://opengraph.githubassets.com/431518f875554fdef21a2eefd3c2f1a4305fc5e3b48f605211d90b5a7d578c98/microsoft/TypeScript/issues/25104 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/431518f875554fdef21a2eefd3c2f1a4305fc5e3b48f605211d90b5a7d578c98/microsoft/TypeScript/issues/25104 |
| og:image:alt | From discussion on a bug with related symptoms. class C { /** * @typedef {C~A} C~B * @typedef {object} C~A */ /** @param {C~A} o */ constructor(o) { } } Expected behavior: No crash, although o: any... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sandersn |
| 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