Skip to content

Debug Failure. No error for last overload signature #60229

Description

🔎 Search Terms

Debug Failure. No error for last overload signature

possibly related to

🕗 Version & Regression Information

  • This is the behavior in every version I tried, from 4.5.5 on through 5.7.0-dev.20241014. In 4.4 there's a different error, RangeError: Maximum call stack size exceeded.

⏯ Playground Link

Playground link

💻 Code

// First copy of a librarytypeComponentDefinitionExports<T>=TextendsComponentDefinition<infer Exports> ? Exports : never;classInstalledComponent<DefinitionextendsComponentDefinition<any>>{getexports(): ComponentDefinitionExports<Definition>{returnnullasany;}}typeComponentDefinition<_Exports>={use<DefinitionextendsComponentDefinition<any>>(definition: Definition): InstalledComponent<Definition>;};functiondefineComponent(): ComponentDefinition<any>{returnnullasanyasComponentDefinition<any>;}constaggregate=defineComponent();// Imagine another copy of the librarytypeComponentDefinitionExports2<T>=TextendsComponentDefinition2<infer Exports> ? Exports : never;classInstalledComponent2<DefinitionextendsComponentDefinition2<any>>{getexports(): ComponentDefinitionExports2<Definition>{returnnullasany;}}typeComponentDefinition2<_Exports>={use<DefinitionextendsComponentDefinition2<any>>(definition: Definition): InstalledComponent2<Definition>;};exporttypeAppDefinition2={use<DefinitionextendsComponentDefinition2<any>>(definition: Definition): InstalledComponent2<Definition>;};exportfunctiondefineApp2(): AppDefinition2{returnnullasany;}constapp=defineApp2();app.use(aggregate);

🙁 Actual behavior

tsc exits with error code 1 and write to stderr Debug Failure. No error for last overload signature

/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:113984
throw e;
^
Error: Debug Failure. No error for last overload signature
at resolveCall (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:69834:19)
at resolveCallExpression (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:70216:12)
at resolveSignature (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:70599:16)
at getResolvedSignature (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:70619:20)
at checkCallExpression (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:70728:23)
at checkExpressionWorker (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:73819:16)
at checkExpression (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:73729:32)
at checkExpressionStatement (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:76310:5)
at checkSourceElementWorker (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:79237:16)
at checkSourceElement (/Users/tomb/aggregate/node_modules/typescript/lib/tsc.js:79097:7)

In the playground,

Uncaught (in promise) Error: Debug Failure. No error for last overload signature
at wR (tsWorker.js:341:318135)
...

🙂 Expected behavior

I'm not sure. I'd like this to pass typechecking.

Additional information about the issue

I tried to minimize this but I imagine this is not the minimal repro. Please give this a better title :)

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: CrashesUnhandled exceptions/panics with no immediate primary root cause identified

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions