[P2] Tests: lazy class storage test expects erased declare fields at runtime
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 1/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- csharp, typescript
調査の方向性
LazyClassFieldStorageTests.GenericDeclareAndComputedInitializers_MaterializeAndVerifyを見つけ、提供されたTypeScriptソースと併せて期待出力を確認してください。不一致を確認するためにテストを実行してください。Nodeの結果に一致するよう期待出力のみを更新し、ソースと完全なIL検証アサーションを保持すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The existing compiler test LazyClassFieldStorageTests.GenericDeclareAndComputedInitializers_MaterializeAndVerify expects a declare field to exist on the emitted instance and contain null.
Its unchanged source is:
const key: string = "computed";
class Box<T> {
value: T;
declare absent: any;
[key]: number = 2;
constructor(value: T) { this.value = value; }
}
const box: any = new Box<number>(3);
console.log(box.value, box.absent, box.computed,
Object.hasOwn(box, "absent"), Object.hasOwn(box, "computed"));
Strict TypeScript accepts this source. Node prints:
3 undefined 2 false true
The test still expects:
3 null 2 true true
A declare field is erased, so the Node result is the intended runtime behavior. Both the tested compiler parent and the candidate for #2737 produce the correct result after complete IL verification with only System assembly references. The assertion therefore fails on both; this is a stale test oracle, not a runtime regression from #2737.
Update the expected output while preserving the complete source and the existing IL-verification assertion. Found while expanding #2737 validation. The original test was added with the lazy-storage work associated with #1459.
- 主要言語
- C#
- スター
- 156
- フォーク
- 4
- 平均マージ
- 4時間 52分
- マージ済み PR(30日)
- 45
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nickna/SharpTS のほかの issue
-
[P2] Tests: boxed Number getter characterization expects obsolete receiver identity対応中かも @nickna が 1 日前に担当しました。 オープンbug priority: P2
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[P2] Interpreter: Object.keys includes non-enumerable class-instance properties対応中かも @nickna が 1 日前に担当しました。 オープンbug priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[P2] Parser: optional computed class fields are rejected対応中かも @nickna が 1 日前に担当しました。 オープンbug priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[P2] Compiler: absent Promise instance properties read as null instead of undefined対応中かも @nickna が 1 日前に担当しました。 オープンbug priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[P2] Interpreter: global isNaN treats null and empty string as NaN対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Nimblesite/SharpLsp#468 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
elastic/ecs-dotnet#575 ·
-
alerts bug effort:S P2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
nightscout/nocturne#2511 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
Crash in v3.00オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
arkane-systems/mousejiggler#140 ·