Skip to content

Commit f817ecc

Browse files
Merge pull request #141 from exaexa/mk-fix-alltypesigs
fix broadcast on `Base.rewrap_unionall` in `alltypesigs`
2 parents 1df1224 + f286fc6 commit f817ecc

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/utilities.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ function alltypesigs(sig)::Vector{Any}
111111
elseif isa(sig, Union)
112112
uniontypes(sig)
113113
elseif isa(sig, UnionAll)
114-
Base.rewrap_unionall.(uniontypes(Base.unwrap_unionall(sig)), sig)
114+
Any[Base.rewrap_unionall(usig, sig) for
115+
usig in uniontypes(Base.unwrap_unionall(sig))]
115116
else
116117
Any[sig]
117118
end

test/tests.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -645,11 +645,7 @@ end
645645
@test DSE.alltypesigs(Union{}) == Any[]
646646
@test DSE.alltypesigs(Union{Tuple{}}) == Any[Tuple{}]
647647
@test DSE.alltypesigs(Tuple{}) == Any[Tuple{}]
648-
649-
# TODO: Clean me up
650-
T = Type{T} where {T}
651-
@test DSE.alltypesigs(T) ==
652-
Base.rewrap_unionall.(DSE.uniontypes(Base.unwrap_unionall(T)), T)
648+
@test DSE.alltypesigs(Tuple{G} where G) == Any[Tuple{G} where G]
653649
end
654650
@testset "groupby" begin
655651
let groups = DSE.groupby(Int, Vector{Int}, collect(1:10)) do each

0 commit comments

Comments
 (0)