Promise.all result is treated as possibly undefined, widening mapped rows
メンテナーはふだん 1 日以内に返信
@alantriesagain がすでに取り組んでいます。
2026年11月6日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 47/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
- 領域
- compilers
調査の方向性
Start with the optional-read analysis that assigns facts to Promise.all results, then inspect the TypeScript and JavaScript corpus cases async-early-return-promise-all.ts and async-early-return-promise-all.js. Compare their SC9001 failures with the reported passing cases 4948 and 4956, and check the Promise.allSettled behavior. Done means the reported Promise.all cases compile without the internal errors while Promise.allSettled remains conservative.
索引モデルが issue の本文から書いたものです。
説明
Promise.all result is treated as possibly undefined, widening mapped rows
The optional-read analysis assumes that any Promise.all result can hold undefined. That fact lands on the element ABI of the array the result is stored in. After
rows = await Promise.all(rows.map((row) => load(row, includes)));
every array of that element type counted as possibly holding undefined. The map callback's parameter widened, the parameter of load widened with it, and an early return row made load return Promise<Row | undefined>. The callback's return became Promise<Row> | undefined, which nothing converts to, and the build failed with SC2003. In JavaScript the site was deferred, and a computed-key write through a loop binding over the result then failed validation.
A typed promise settles with a value of its own type. Every conversion into it checks the value, and the element ABI already records whether that type admits undefined. The Promise.all result therefore holds undefined only where an entry is a hole or undefined. Promise.allSettled keeps the conservative fact.
On 0.4.8, the TypeScript and JavaScript forms in our corpus (async-early-return-promise-all.ts and async-early-return-promise-all.js) still fail with SC9001 internal compiler errors around %recordValue and a bare null at row[field] = null. The separate JavaScript array and indexOf precision programs (4948 and 4956) now pass. The same failures reproduce on main (979a65246).
I opened #TBD with a patch for the Promise.all fact.
- 主要言語
- TypeScript
- スター
- 6.5k
- フォーク
- 212
- 平均マージ
- 13時間 2分
- マージ済み PR(30日)
- 798
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel-labs/scriptc のほかの issue
-
Discarded negation of a void call rejects valid JavaScript対応中かも @MathurAditya724 が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 1/100
vercel-labs/scriptc#3358 ·
メンテナーはふだん 1 日以内に返信
-
Optional JSDoc rejects mandatory JavaScript setter parameters対応中かも @MathurAditya724 が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
vercel-labs/scriptc#3355 ·
メンテナーはふだん 1 日以内に返信
-
Correct JavaScript refusal descriptions for mutable bindings and missing properties対応中かも @MathurAditya724 が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
vercel-labs/scriptc#3354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
vercel-labs/scriptc#3330 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
vercel-labs/scriptc#3210 ·
メンテナーはふだん 1 日以内に返信
vercel-labs/scriptc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
earendil-works/pi-claude-code#36 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Resources: New work of jabodetabek対応中かも @rmt-svc が今日担当しました。 オープンresources
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
railmapgen/rmp-gallery#4167 ·
メンテナーはふだん 2 日以内に返信
-
documentation p1
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
microsoft/monaco-editor#5577 ·
メンテナーはふだん 1 日以内に返信