microsoft / microsoft/TypeScript
Error: Debug Failure. No error for last overload signature
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
### 🔎 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
https://www.typescriptlang.org/play/?ts=5.9.0-dev.20250403#code/C4TwDgpgBA4hB2EBOBLAxgHgCoD4oF4osoIAPYBAEwGcoBDeEAbQF0oB+Ip+AVwFsARsjYAuLgGsIIAPYAzIiwDcAKGVkw0pMCiye8NMBTT4UCtWAAxeBgCCJclVoAlCGk2UM51PADmAGnpGHBwACmUoKGkBACsxGz9wqDQBMRCU2ARkdAwABTotFDoAG1tggEoCPAYQZQqAb0TZTSgQt3hzKCZJEACAN2K2OSgAeRjXYAA6BGBUCGoQqOiy+sSI5JD+ovpaOERUTBscMpUIgF9lc6A
### 💻 Code
```ts
type Generic = T extends any[] ? T[number] : T[keyof T];
export function testFn>(
obj: A,
cb: (b: Generic>) => any
) {
for (const [key, val] of Object.entries(obj)) {
cb(val as Generic);
}
}
```
### 🙁 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>) => any
```
to
```
cb: (b: Partial>) => any
```
prevents the error. However, this only addresses the symptoms rather than the root cause.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされている nightly バージョンと提供されたジェネリックコールバックの例を使用して、TypeScript Playground でクラッシュを再現します。スタックトレースに示されている resolveCall と resolveCallExpression のエントリから始め、バージョン 3.5.1 および 3.6.2 と動作を比較し、例をコンパイルしてもクラッシュしなくなっていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100