[TS] Evaluate instanceof against the runtime constructor value
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- kotlin, node.js, typescript
- 領域
- compilers, devtools, testing-qa
調査の方向性
Start at the current instanceof evaluator and its use of the static EtsIR checkType, then review the focused symbolic-test entry point described in the issue. Account for dependencies JacoDB #390 and UnitTestBot/jacodb#396 before testing. Done means both outcomes share one static RHS type, direct checks remain covered, and generated inputs and results replay in Node.js.
索引モデルが issue の本文から書いたものです。
説明
Problem
The current instanceof evaluator uses the static checkType from EtsIR. For a dynamic right-hand side, that type does not identify which constructor object the program actually selected. JacoDB PR #395 therefore marks dynamic checks unsupported instead of reporting a possibly false Boolean.
Minimal TypeScript example
class A {}
class B {}
export function check(useA: boolean): boolean {
const ctor = useA ? A : B;
return new A() instanceof ctor;
}
Node.js returns true for check(true) and false for check(false). The ctor expression must be evaluated once; the membership check must use that runtime value, not its static union type.
Expected support
Use the right-hand constructor value and the left-hand object's prototype chain for the supported class-constructor model. Preserve JavaScript behavior for a non-callable RHS (TypeError) where that value is representable. If custom Symbol.hasInstance is outside the current model, report that case as unsupported explicitly.
Acceptance criteria
- A focused symbolic test obtains both outcomes with the same static RHS type and distinguishes unsupported from failure.
- Generated inputs and results replay in Node.js.
- Direct
value instanceof Aremains covered and correct.
Dependencies: JacoDB #390 (RHS evaluation) and UnitTestBot/jacodb#396 (declared class runtime values). Implement this as a separate USVM PR.
- 主要言語
- Kotlin
- スター
- 33
- フォーク
- 27
- 平均マージ
- 3日 8時間
- マージ済み PR(30日)
- 7
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
UnitTestBot/usvm のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
UnitTestBot/usvm#467 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
UnitTestBot/usvm#465 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
UnitTestBot/usvm#462 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
UnitTestBot/usvm#440 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
UnitTestBot/usvm#439 ·
メンテナーはふだん 1 日以内に返信
UnitTestBot/usvm の issue をすべて見る
似ている issue
-
Raijin Scans (FR)オープンBug Domain changed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
keiyoushi/extensions-source#19644 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
node: disconnection push notification is logged as "Unknown notification" instead of the disconnect warning対応中かも @datatrigger が今日担当しました。 オープンbug 🐞 Untriaged user issue
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
valkey-io/valkey-glide#7278 ·
メンテナーはふだん 2 日以内に返信
-
design
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
mobile-dev-inc/Maestro#3659 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信