Title: Stack overflow in recursive type · Issue #20772 · microsoft/TypeScript · GitHub
Open Graph Title: Stack overflow in recursive type · Issue #20772 · microsoft/TypeScript
X Title: Stack overflow in recursive type · Issue #20772 · microsoft/TypeScript
Description: TypeScript Version: playground, typescript@2.7.0-dev.20171216 Code type Recur = () => Recur.B; Expected behavior: Compile error. Actual behavior: Stack overflow. .../node_modules/typescript/lib/tsc.js:59609 throw e; ^ RangeError: Maximum...
Open Graph Description: TypeScript Version: playground, typescript@2.7.0-dev.20171216 Code type Recur = () => Recur.B; Expected behavior: Compile error. Actual behavior: Stack overflow. .../node_modules/typescript/lib/tsc...
X Description: TypeScript Version: playground, typescript@2.7.0-dev.20171216 Code type Recur = () => Recur.B; Expected behavior: Compile error. Actual behavior: Stack overflow. .../node_modules/typescript/lib/...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/20772
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stack overflow in recursive type","articleBody":"**TypeScript Version:** playground, typescript@2.7.0-dev.20171216\r\n**Code**\r\n\r\n```ts\r\ntype Recur = () => Recur.B;\r\n```\r\n\r\n**Expected behavior:**\r\nCompile error.\r\n\r\n**Actual behavior:**\r\nStack overflow.\r\n\r\n```\r\n.../node_modules/typescript/lib/tsc.js:59609\r\n throw e;\r\n ^\r\n\r\nRangeError: Maximum call stack size exceeded\r\n at resolveEntityName (.../node_modules/typescript/lib/tsc.js:20834:35)\r\n at resolveEntityName (.../node_modules/typescript/lib/tsc.js:20859:33)\r\n at resolveTypeReferenceName (.../node_modules/typescript/lib/tsc.js:25382:20)\r\n at getTypeFromTypeReference (.../node_modules/typescript/lib/tsc.js:25481:30)\r\n at getTypeFromTypeNode (.../node_modules/typescript/lib/tsc.js:26360:28)\r\n at getSignatureReturnTypeFromDeclaration (.../node_modules/typescript/lib/tsc.js:24997:24)\r\n at getSignatureFromDeclaration (.../node_modules/typescript/lib/tsc.js:24964:34)\r\n at getSignaturesOfSymbol (.../node_modules/typescript/lib/tsc.js:25062:37)\r\n at resolveAnonymousTypeMembers (.../node_modules/typescript/lib/tsc.js:24311:38)\r\n at resolveStructuredTypeMembers (.../node_modules/typescript/lib/tsc.js:24458:25)\r\n```","author":{"url":"https://github.com/evmar","@type":"Person","name":"evmar"},"datePublished":"2017-12-19T01:13:39Z","url":"https://github.com/microsoft/TypeScript/issues/20772"}
| 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:65e339b4-c400-0173-b3ef-e587ce52dfbe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF0A:842EC:B7F474:F6C0B1:6B00F664 |
| html-safe-nonce | 0d1e32d75acdae4dfeceee790b3f89179d0ae42514e06450ec40a091068eeed4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjBBOjg0MkVDOkI3RjQ3NDpGNkMwQjE6NkIwMEY2NjQiLCJ2aXNpdG9yX2lkIjoiNzE3OTI4MDk3MDg2Mjg4NDQ1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ae60360505eef19451354930f0a45c0aba9173acda93d1b8596d319635208bbb |
| hovercard-subject-tag | issue:283073759 |
| 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/20772/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ecb0db04602f13fadb3355f48201dc57484f40444f07c1a4c5def1c842f7f37c/microsoft/TypeScript/issues/20772 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ecb0db04602f13fadb3355f48201dc57484f40444f07c1a4c5def1c842f7f37c/microsoft/TypeScript/issues/20772 |
| og:image:alt | TypeScript Version: playground, typescript@2.7.0-dev.20171216 Code type Recur = () => Recur.B; Expected behavior: Compile error. Actual behavior: Stack overflow. .../node_modules/typescript/lib/tsc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | evmar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width