microsoft / microsoft/TypeScript
Error: Debug Failure. No error for last overload signature
Personne n'a encore pris cette issue.
- Langage dominant
- Go
- Étoiles
- 111k
- Forks
- 14.3k
- Merge moyen
- 2 j 4 h
- PR mergées (30 j)
- 132
Description
🔎 Search Terms
The TypeScript compiler crashs with the message "Error: Debug Failure. No error for last overload signature". (Check the DevTools console for the error message in the TypeScript Playground).
I've found issue #60229, which has the same error message. However, I am not sure if the root cause is the same.
🕗 Version & Regression Information
- The problem appears in the latest nightly version (v5.9.0-dev.20250403)
- This changed between versions 3.5.1 and 3.6.2 (in the Playground it works in 3.5.1 but not in 3.6.2 anymore)
⏯ Playground Link
💻 Code
type Generic<T> = T extends any[] ? T[number] : T[keyof T];
export function testFn<A extends Record<string, any>>(
obj: A,
cb: (b: Generic<Partial<A>>) => any
) {
for (const [key, val] of Object.entries(obj)) {
cb(val as Generic<A>);
}
}
🙁 Actual behavior
The compiler crashs with:
Error: Debug Failure. No error for last overload signature
at resolveCall (M:\websites\app\node_modules\typescript\lib\_tsc.js:75576:19)
at resolveCallExpression (M:\websites\app\node_modules\typescript\lib\_tsc.js:75970:12)
at resolveSignature (M:\websites\app\node_modules\typescript\lib\_tsc.js:76398:16)
at getResolvedSignature (M:\websites\app\node_modules\typescript\lib\_tsc.js:76425:20)
at checkCallExpression (M:\websites\app\node_modules\typescript\lib\_tsc.js:76533:23)
at checkExpressionWorker (M:\websites\app\node_modules\typescript\lib\_tsc.js:79950:16)
at checkExpression (M:\websites\app\node_modules\typescript\lib\_tsc.js:79849:32)
at checkExpressionCached (M:\websites\app\node_modules\typescript\lib\_tsc.js:79473:28)
at checkVariableLikeDeclaration (M:\websites\app\node_modules\typescript\lib\_tsc.js:82311:35)
at checkVariableDeclaration (M:\websites\app\node_modules\typescript\lib\_tsc.js:82407:5)
🙂 Expected behavior
That the compiler does not crash.
Additional information about the issue
Changing
cb: (b: Generic<Partial<A>>) => any
to
cb: (b: Partial<Generic<A>>) => any
prevents the error. However, this only addresses the symptoms rather than the root cause.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez le crash dans TypeScript Playground en utilisant la version nightly indiquée par le lien et l’exemple de callback générique fourni. Commencez par les entrées resolveCall et resolveCallExpression affichées dans la stack trace, comparez le comportement avec les versions 3.5.1 et 3.6.2, et vérifiez que la compilation de l’exemple ne provoque plus de crash.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- compilers
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100