[TS] Support field assignments that change the runtime value sort
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- kotlin, typescript
Hướng nghiên cứu
Start with the unsupported path reported by PR #466 and the related context in issue #465, using the minimal TypeScript example as the reproducer. Add the focused symbolic tests described in the acceptance criteria, including the alias case, and replay generated concrete cases in Node.js; done means both branches have no unsupported paths and existing typed field operations remain correct.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
TypeScript permits assigning a value whose JavaScript type differs from a field's declared type when the receiver has a union type. The symbolic executor stores fields in separate regions by value sort. After selecting a concrete runtime class, a write of another sort cannot be represented by that class's declared field region. USVM #465 / PR #466 now reports that path as unsupported; it still needs a sound model.
Minimal TypeScript example
class Numeric {
value: number = 1;
numericOnly: boolean = true;
}
class Text {
value: string = "initial";
textOnly: boolean = true;
}
export function check(useNumeric: boolean): boolean {
const object = new (useNumeric ? Numeric : Text)();
object.value = "changed";
return object.value === "changed";
}
TypeScript accepts this code, and Node.js returns true for both check(true) and check(false). With PR #466, the Text branch is modeled and the Numeric branch is explicitly reported in unsupportedPaths because assigning a string changes the field's runtime value sort.
Expected support
Model the current value of an object field independently of its declared TypeScript type. A write that changes the JavaScript value type must replace the previous value; subsequent reads, including through aliases, must observe the new type and value. Branches that cannot yet be modeled should remain explicitly unsupported rather than produce a stale field value.
Acceptance criteria
- A focused symbolic test covers both branches with no unsupported paths and checks that both return
true. - The generated concrete cases replay in Node.js.
- A second test reads the changed field through an alias and confirms that the original field value is no longer visible.
- Existing typed numeric, Boolean, reference, and
anyfield operations remain correct.
Related: #465 and PR #466. This task concerns value type changes after assignment, not constructor selection.
- Ngôn ngữ chính
- Kotlin
- Star
- 33
- Fork
- 27
- Merge trung bình
- 3 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của UnitTestBot/usvm
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
UnitTestBot/usvm#465 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
UnitTestBot/usvm#462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
UnitTestBot/usvm#457 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
UnitTestBot/usvm#440 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
UnitTestBot/usvm#439 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của UnitTestBot/usvm
Issue tương tự
-
Raijin Scans (FR)Đang mởBug Domain changed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
keiyoushi/extensions-source#19644 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
node: disconnection push notification is logged as "Unknown notification" instead of the disconnect warningCó thể đã có người làm @datatrigger đã nhận hôm nay. Đang mởbug 🐞 Untriaged user issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
valkey-io/valkey-glide#7278 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
mobile-dev-inc/Maestro#3659 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày