Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

"No error for last overload signature" regression in #58859Β #60202

Copy link
Copy link
@LukeAbby

Description

@LukeAbby
Issue body actions

πŸ”Ž Search Terms

Error: Debug Failure. No error for last overload signature

πŸ•— Version & Regression Information

⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.6.3#code/KYDwDg9gTgLgBAbwL4G4BQaAmwDGAbAQymDnwIGdy4ARCHAVwFtgA7GAHgAUjWYA+REgzYyxUoUpwAQhWABJGMEZxQilpiq0GzNuxgBPMMAgAzOAqUDkw3ITEn6LHDACWEFnADCeF7y1NeAFkXEBcWdhlyYG8KKlVWDTgWYAB3OAAKADpsogBzcgAuOAIWfQBtAF0ASjgAXgES-T50yOAi1pjKKqLG9CxbHnFY80VlePUqb182fx0YYNCWFtkLRhrrIA

🚨 NOTE: You have to make an edit in the playground for an error to show up and due to the nature of this bug you have to run it locally through tsc to reproduce the Debug Failure error message listed.

πŸ’» Code

Please note both in editor and in the playground (after you make an edit) it will error with this:

Argument of type 'typeof BaseItem' is not assignable to parameter of type 'new (...args: any[]) => any'.
  Type 'typeof BaseItem' provides no match for the signature 'new (...args: any[]): any'.

This is also one of the error you get on commits before the regression. However given the nature of the issue at hand, you must run tsc from the command line to get this result.

My personal judgement is that this error shouldn't be happening in the first place either. You can see that even when it's definitely not actually a loop it can still happen.

Here's the source code:

export {};

declare class Document<Parent> {}

declare class BaseItem extends Document<typeof Item> {}

declare function ClientDocumentMixin<BaseClass extends new (...args: any[]) => any>(Base: BaseClass): any;

declare class Item extends ClientDocumentMixin(BaseItem) {}

πŸ™ Actual behavior

node_modules/every-ts/.data/TypeScript/lib/_tsc.js:121680
      throw e;
      ^

Error: Debug Failure. No error for last overload signature
    at resolveCall (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:75251:19)
    at resolveCallExpression (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:75645:12)
    at resolveSignature (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:76071:16)
    at getResolvedSignature (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:76098:18)
    at checkCallExpression (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:76209:23)
    at checkExpressionWorker (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:79633:16)
    at checkExpression (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:79532:32)
    at getBaseConstructorTypeOfClass (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:55870:35)
    at getBaseTypeVariableOfClass (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:55521:33)
    at getTypeOfFuncClassEnumModuleWorker (node_modules/every-ts/.data/TypeScript/lib/_tsc.js:55566:32)

Node.js v20.15.0

πŸ™‚ Expected behavior

No debug failure.

Additional information about the issue

I did find #52952 (February 24th 2023) and #55217 (July 31rd 2023) but given those issues were opened before the commit that caused my regression (July 15th 2024) I can say they are likely separate but likely similar issues.

I was also pointed to #60159 which may be related.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.