`collect` returns `Vector{Any}` for `Iterators.reverse(::Stack)`, `zip(::SparseIntSet...)` and `partial_path`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend
Hướng nghiên cứu
Start with the three iterator types named in the issue: DequeIterator in src/deque.jl (around line 135), ZippedSparseIntSetIterator in src/sparse_int_set.jl (around line 210), and TrieIterator in src/trie.jl (around line 100). Run the reproduction snippet from the issue to confirm that collect returns Vector{Any}. Done means each iterator reports a concrete eltype so collect yields a typed vector, with the choice for TrieIterator (type parameter or EltypeUnknown) settled first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
These exported iterators have no eltype, so collect returns Vector{Any}:
using DataStructures
s = Stack{Int}(); push!(s, 1)
a = SparseIntSet([1, 2])
t = Trie{Char,Int}(); t["ab"] = 1
@show typeof(collect(Iterators.reverse(s))) typeof(first(Iterators.reverse(s)))
@show typeof(collect(zip(a, a))) typeof(first(zip(a, a)))
@show typeof(collect(partial_path(t, "ab"))) typeof(first(partial_path(t, "ab")))
Output on master (b9ff234), Julia 1.13.3:
typeof(collect(Iterators.reverse(s))) = Vector{Any}
typeof(first(Iterators.reverse(s))) = Int64
typeof(collect(zip(a, a))) = Vector{Any}
typeof(first(zip(a, a))) = Tuple{Int64, Int64}
typeof(collect(partial_path(t, "ab"))) = Vector{Any}
typeof(first(partial_path(t, "ab"))) = Trie{Char, Int64}
DequeIterator (src/deque.jl:135), ZippedSparseIntSetIterator (src/sparse_int_set.jl:210) and TrieIterator (src/trie.jl:100) define iterate but no eltype. IteratorEltype keeps its default HasEltype(), so collect trusts the fallback eltype of Any. TrieIterator is not parameterized, so it would need a type parameter or IteratorEltype set to EltypeUnknown().
- Ngôn ngữ chính
- Julia
- Star
- 747
- Fork
- 261
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 JuliaCollections/DataStructures.jl
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
append!(l1::MutableLinkedList, l2::MutableLinkedList) fails for empty l2Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Tất cả issue của JuliaCollections/DataStructures.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
JuliaDebug/Cthulhu.jl#716 ·
-
Review dependenciesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rafaqz/DimensionalData.jl#1253 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
osrep/Runes2P.jl#283 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày