René's URL Explorer Experiment


Title: Conditional type triggers "No error for last overload signature" exception · Issue #55217 · microsoft/TypeScript · GitHub

Open Graph Title: Conditional type triggers "No error for last overload signature" exception · Issue #55217 · microsoft/TypeScript

X Title: Conditional type triggers "No error for last overload signature" exception · Issue #55217 · microsoft/TypeScript

Description: Bug Report 🔎 Search Terms "No error for last overload signature" yields stale issue 35186, and a couple of more recent issues that got resolved: 48636, 37974. (The stale 35186 appears to be a different issue as it also occurs in versions...

Open Graph Description: Bug Report 🔎 Search Terms "No error for last overload signature" yields stale issue 35186, and a couple of more recent issues that got resolved: 48636, 37974. (The stale 35186 appears to be a diffe...

X Description: Bug Report 🔎 Search Terms "No error for last overload signature" yields stale issue 35186, and a couple of more recent issues that got resolved: 48636, 37974. (The stale 35186 appears to ...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/55217

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Conditional type triggers \"No error for last overload signature\" exception","articleBody":"# Bug Report\r\n\r\n\u003c!--\r\n  Please fill in each section completely. Thank you!\r\n--\u003e\r\n\r\n### 🔎 Search Terms\r\n\r\n**\"No error for last overload signature\"** yields [stale issue 35186](https://github.com/microsoft/TypeScript/issues/35186), and a couple of more recent issues that got resolved: [48636](https://github.com/microsoft/TypeScript/issues/48636), [37974](https://github.com/microsoft/TypeScript/issues/37974). (The stale 35186 appears to be a different issue as it also occurs in versions before v5.0.4.)\r\n\u003c!--\r\n  What search terms did you use when trying to find an existing bug report?\r\n  List them here so people in the future can find this one more easily.\r\n--\u003e\r\n\r\n### 🕗 Version \u0026 Regression Information\r\n\r\n\u003c!-- When did you start seeing this bug occur?\r\n\r\n\"Bugs\" that have existed in TS for a long time are very likely to be FAQs; refer to\r\n  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs\r\n\r\nIf possible, please try testing the nightly version of TS to see if it's already been fixed.\r\nFor npm: `typescript@next`\r\nThis is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly\r\n\r\nNote: The TypeScript Playground can be used to try older versions of TypeScript.\r\n\r\nPlease keep and fill in the line that best applies:\r\n--\u003e\r\n- This is a crash\r\n- This changed between versions 4.9.5 and 5.0.4, and still occurs up to typescript@next.\r\n\r\n### ⏯ Playground Link\r\n\r\n\u003c!--\r\n  A link to a TypeScript Playground \"Share\" link which shows this behavior.\r\n  This should have the same code as the code snippet below, and use whichever settings are relevant to your report.\r\n\r\n  As a last resort, you can link to a repo, but these will be slower for us to investigate.\r\n--\u003e\r\n[Bug-workbench link with relevant code](https://www.typescriptlang.org/dev/bug-workbench/?ts=5.2.0-beta#code/PTAEAEDMEsBsFMB2BDAtvAXKALgTwA7wDOAdNkQFDwAe+A9gE7Y4HygAKDdAJgK4DG2AHJo2AXlAByZJNAAfKQCNJFKrUbM8hUAGVei-Fz6CR6AGKNOPAcNEAedqBrYk3IhyM3T8AHygJjs6u7ryIANaIdADuiBSgoAD8oGHwuHSQoACiiNjQucQAQrhWxrboANrsALpxoFiI8ABu8AyqWmzZuflERSVeov6gAN61yFhDoMgAjOOgjciwvJhSyAC007IAvqCbtYqzijPDcwtLWJKKq4dbOxS7avRMLNoAItBE-AzQqNAoLtwAVUQ0DoiDstUC1BciDcHmsJgGAU8CPQABpapknFDgrp9IZ4WV4BYGH0UfAHH4JHoDMjCcTSYSKejKRwsdDYQzvLV4klMUEYe5qfjSt56bTvBTuaAQIksmycaEItFENKwAB1PIAC1AisiMVROE1bBo-Hg+FyoNA3DoxEQkmYmuQ+EIiBIoClPKyOTy0EKxXFokqVXKmRq8XDdVADWarQj9SaLVUMqgcCQoiwTvwZEo30ezAmQoD5ksRfgBreHy+Pz+8EBwNBBs5A22kC4qCkJGA7SIKgeGlA-FBRGYil4AHNBg55QK4SLRD4ABQASn8fhG8UHiGHoCIeNpRCwFc+31+yH+QJBYPYBsLBNFJbv9nYPh85SqgzftV3NIJpFQToXBcAH1D3eY9qzPWsL1BFcxD8RBeFgWAlzuCggA)\r\n\r\n### 💻 Code\r\n\r\n```ts\r\n// @filename: types.ts\r\nexport type ProductName = 'a' | 'b'\r\n\r\nexport type SubproductNameForProductName\u003cP extends ProductName\u003e = P extends unknown\r\n  ? keyof EntitiesByProductName[P]\r\n  : never\r\n\r\ntype EntitiesByProductName = {\r\n  a: { a1: { value: 'a-a1' } }\r\n  b: { b1: { value: 'b-b1' } }\r\n}\r\n\r\nexport type DiscriminatedUnion\u003c\r\n  P extends ProductName = ProductName,\r\n  E extends SubproductNameForProductName\u003cP\u003e = SubproductNameForProductName\u003cP\u003e,\r\n\u003e = P extends ProductName\r\n    ? E extends SubproductNameForProductName\u003cP\u003e\r\n    // ? E extends unknown // With unknown, the exception doesn't happen. \r\n      ? EntitiesByProductName[P][E]\r\n      : never\r\n    : never\r\n\r\n// @filename: app.ts\r\nimport { SubproductNameForProductName, DiscriminatedUnion, ProductName } from './types'\r\n\r\nexport const bug = \u003cP extends ProductName\u003e() =\u003e {\r\n  const subproducts: DiscriminatedUnion\u003cP, SubproductNameForProductName\u003cP\u003e\u003e[] = []\r\n  subproducts.map((_: DiscriminatedUnion) =\u003e null)\r\n}\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\nThe compiler throws an exception:\r\n```\r\n/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:114747\r\n      throw e;\r\n      ^\r\n\r\nError: Debug Failure. No error for last overload signature\r\n    at resolveCall (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:70223:19)\r\n    at resolveCallExpression (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:70605:12)\r\n    at resolveSignature (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:70988:16)\r\n    at getResolvedSignature (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:71008:18)\r\n    at checkCallExpression (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:71120:23)\r\n    at checkExpressionWorker (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:74278:16)\r\n    at checkExpression (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:74189:32)\r\n    at maybeCheckExpression (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:73280:28)\r\n    at BinaryExpressionStateMachine.onLeft (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:73216:16)\r\n    at Array.left (/Users/martijn/git/Insify/insify-core/node_modules/typescript/lib/tsc.js:25140:30)\r\n```\r\n\r\n### 🙂 Expected behavior\r\n\r\nNo compiler exception.\r\n","author":{"url":"https://github.com/Oblosys","@type":"Person","name":"Oblosys"},"datePublished":"2023-07-31T16:50:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/55217/TypeScript/issues/55217"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:89bd0a95-0d9f-41d7-5251-ca010d3d381a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBA7E:90030:4CCB5C:6FD5F7:6A61EB71
html-safe-noncefa59d422c04b62cb3070bf017d4e425252bc8e774ba7346e36a101d171af57b2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTdFOjkwMDMwOjRDQ0I1Qzo2RkQ1Rjc6NkE2MUVCNzEiLCJ2aXNpdG9yX2lkIjoiMzU4MjE4MTcxOTQxMDg2Mjk2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac96ef24542c1dfa8c2fdd30a06abc7fb1960b70a98f0a252ca1033371960c1ecb
hovercard-subject-tagissue:1829651562
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/55217/issue_layout
twitter:imagehttps://opengraph.githubassets.com/45205611f0c9250429c62deecca111dc83d2f4a9f5adb9454d7f1e4905e2afb5/microsoft/TypeScript/issues/55217
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/45205611f0c9250429c62deecca111dc83d2f4a9f5adb9454d7f1e4905e2afb5/microsoft/TypeScript/issues/55217
og:image:altBug Report 🔎 Search Terms "No error for last overload signature" yields stale issue 35186, and a couple of more recent issues that got resolved: 48636, 37974. (The stale 35186 appears to be a diffe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameOblosys
hostnamegithub.com
expected-hostnamegithub.com
None5dd1217fff37e297563b9d318ee02bf6378c8957c6195b77786bb8896fc9c95d
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release554667f6dda2a53c83687de64fabc457970f0f04
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/55217#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F55217
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F55217
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/55217
Reloadhttps://github.com/microsoft/TypeScript/issues/55217
Reloadhttps://github.com/microsoft/TypeScript/issues/55217
Please reload this pagehttps://github.com/microsoft/TypeScript/issues/55217
microsoft https://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Fork 13.6k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Star 110k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Code https://github.com/microsoft/TypeScript
Issues 5k+ https://github.com/microsoft/TypeScript/issues
Pull requests 21 https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality 0 https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
Code https://github.com/microsoft/TypeScript
Issues https://github.com/microsoft/TypeScript/issues
Pull requests https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
Conditional type triggers "No error for last overload signature" exceptionhttps://github.com/microsoft/TypeScript/issues/55217#top
https://github.com/jakebailey
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: Conditional TypesThe issue relates to conditional typeshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Conditional%20Types%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
RescheduledThis issue was previously scheduled to an earlier milestonehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Rescheduled%22
TypeScript 5.7.0https://github.com/microsoft/TypeScript/milestone/208
https://github.com/Oblosys
Oblosyshttps://github.com/Oblosys
on Jul 31, 2023https://github.com/microsoft/TypeScript/issues/55217#issue-1829651562
stale issue 35186https://github.com/microsoft/TypeScript/issues/35186
48636https://github.com/microsoft/TypeScript/issues/48636
37974https://github.com/microsoft/TypeScript/issues/37974
Bug-workbench link with relevant codehttps://www.typescriptlang.org/dev/bug-workbench/?ts=5.2.0-beta#code/PTAEAEDMEsBsFMB2BDAtvAXKALgTwA7wDOAdNkQFDwAe+A9gE7Y4HygAKDdAJgK4DG2AHJo2AXlAByZJNAAfKQCNJFKrUbM8hUAGVei-Fz6CR6AGKNOPAcNEAedqBrYk3IhyM3T8AHygJjs6u7ryIANaIdADuiBSgoAD8oGHwuHSQoACiiNjQucQAQrhWxrboANrsALpxoFiI8ABu8AyqWmzZuflERSVeov6gAN61yFhDoMgAjOOgjciwvJhSyAC007IAvqCbtYqzijPDcwtLWJKKq4dbOxS7avRMLNoAItBE-AzQqNAoLtwAVUQ0DoiDstUC1BciDcHmsJgGAU8CPQABpapknFDgrp9IZ4WV4BYGH0UfAHH4JHoDMjCcTSYSKejKRwsdDYQzvLV4klMUEYe5qfjSt56bTvBTuaAQIksmycaEItFENKwAB1PIAC1AisiMVROE1bBo-Hg+FyoNA3DoxEQkmYmuQ+EIiBIoClPKyOTy0EKxXFokqVXKmRq8XDdVADWarQj9SaLVUMqgcCQoiwTvwZEo30ezAmQoD5ksRfgBreHy+Pz+8EBwNBBs5A22kC4qCkJGA7SIKgeGlA-FBRGYil4AHNBg55QK4SLRD4ABQASn8fhG8UHiGHoCIeNpRCwFc+31+yH+QJBYPYBsLBNFJbv9nYPh85SqgzftV3NIJpFQToXBcAH1D3eY9qzPWsL1BFcxD8RBeFgWAlzuCggA
jakebaileyhttps://github.com/jakebailey
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: Conditional TypesThe issue relates to conditional typeshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Conditional%20Types%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
RescheduledThis issue was previously scheduled to an earlier milestonehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Rescheduled%22
TypeScript 5.7.0No due datehttps://github.com/microsoft/TypeScript/milestone/208
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.