Skip to content

Commit

Permalink
fix TypeofVararg issue for Julia 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Helmut Hänsel committed Jul 19, 2023
1 parent 4886ae9 commit b27131e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/StippleUIParser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,16 @@ end


REV_DICT = Dict(zip(values(StippleUI.API.ATTRIBUTES_MAPPINGS), keys(StippleUI.API.ATTRIBUTES_MAPPINGS)))
ToV = @static if isdefined(Core, :TypeofVararg) # VERSION >= v"1.7.0-DEV.77"
# Core.TypeofVararg introduced in https://github.com/JuliaLang/julia/pull/38136
typeof(Vararg)
else
# not sure whether this will handle all cases correctly, but tests pass
UnionAll
end

function method_signature(m::Method)
Tuple[(v, T) for (v, T) in zip(split(m.slot_syms, '\0')[2:end-1], m.sig.types[2:end]) if ! (T isa Core.TypeofVararg)]
Tuple[(v, T) for (v, T) in zip(split(m.slot_syms, '\0')[2:end-1], m.sig.types[2:end]) if ! (T isa ToV)]
end

function method_signatures(mm::Union{Vector{Method}, Base.MethodList})
Expand Down

2 comments on commit b27131e

@hhaensel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/87839

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.22.6 -m "<description of version>" b27131e3b4cd2961098f1534775317df7a7c73d9
git push origin v0.22.6

Please sign in to comment.