Untagged variant puts one typed array in another typed array's case
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
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- compilers
Hướng nghiên cứu
Start with rule 5 in compiler/ml/UntaggedVariants.md and review the linked context in #8952 and #8950, which changes how the types are recognized. Reproduce the example with the two typed arrays and trace how their type names are used for run-time case checks. Done means the invalid overlap is rejected or the mismatched value becomes a type error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
An untagged variant with cases for two typed arrays accepts a value of one typed array in the case of the other, and the value then matches the other case.
@unboxed type ta = I8(Int8Array.t) | U8(Uint8Array.t)
let f = v => switch v { | I8(_) => "i8" | U8(_) => "u8" }
Console.log(f(I8(Uint8Array.fromArray([1]))))
Output: u8.
The typed-array types are abbreviations of one type, so I8(Uint8Array…) type-checks. The cases are classified by the type name as written, so the run-time check is instanceof Uint8Array.
Expected: either the cases are distinct types, so that I8(Uint8Array…) is a type error, or the variant is rejected because two cases share one type.
The rule is compiler/ml/UntaggedVariants.md rule 5, in #8952. #8950 changes how these types are recognized.
- Ngôn ngữ chính
- OCaml
- Star
- 7.5k
- Fork
- 483
- Merge trung bình
- 19 giờ 35 phút
- Pull request đã merge (30 ngày)
- 208
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 rescript-lang/rescript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
rescript-lang/rescript#9037 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Per-constructor @unboxed is not compared across interfaces or coercionsCó thể đã có người làm @cknitt đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
rescript-lang/rescript#9038 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
rescript-lang/rescript#9006 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
rescript-lang/rescript#8997 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
rescript-lang/rescript#8994 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rescript-lang/rescript
Issue tương tự
-
area:codegen backend:cuda backend:hip bug direction:input
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CrossGL/crosstl#3061 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
build
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
AOMediaCodec/SVT-AV1#2500 ·
-
SIGSEGV in symex on __builtin_constant_p of a void expressionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug goto-symex
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày