microsoft / microsoft/TypeScript
missing 'used before declaration' error within computed name of accessor or method
オープン
まだ誰も着手していません。
Bug
Domain: Binder
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
TypeScript Version: 3.3.0-dev.20181222
Search Terms:
Code
Taken from the tests added in https://github.com/Microsoft/TypeScript/pull/29136
class D {
static A = class extends D.B {
[D.D]() {} // should be an error
}
static B = class {}
static C = {
[D.D]: 1,
...{get [D.D]() {return 0;}} // should be an error
};
static D = '';
[foo]() {} // should have an error
}
let bar = {
[foo]() {} // should have an error
}
let foo = 1;
Expected behavior:
The lines marked with // should be an error should have an error.
Actual behavior:
Currently there's no error at all. After #29136 lands the lines with the comments are missing an error.
Related Issues: #29135
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、pull request #29136 で追加されたテストと関連する issue #29135 を確認し、その後、報告された TypeScript のバージョンまたは Playground のリンクを使って例を再現してください。マークされた computed-name のケースが、アクセサー名とメソッド名を含め、期待される「used before declaration」エラーを生成すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100