Skip to content

signature fails on method with Vararg #28

Description

@BioTurboNick
julia> signature(methods(read)[12]) # read(filename::AbstractString, args...) in Base at io.jl:460
ERROR: DomainError with (Vararg{Any}, Core.TypeofVararg):
not a valid type-param
Stacktrace:
  [1] name_of_type
    @ C:\Users\nicho\.julia\packages\ExprTools\4kw5E\src\method.jl:146 [inlined]
  [2] (::ExprTools.var"#13#14")(name::Symbol, type::Core.TypeofVararg)
    @ ExprTools C:\Users\nicho\.julia\packages\ExprTools\4kw5E\src\method.jl:186
  [3] (::Base.var"#4#5"{ExprTools.var"#13#14"})(a::Tuple{Symbol, Core.TypeofVararg})
    @ Base .\generator.jl:36
  [4] iterate
    @ .\generator.jl:47 [inlined]
  [5] collect_to!(dest::Vector{Expr}, itr::Base.Generator{Base.Iterators.Zip{Tuple{Vector{Symbol}, Core.SimpleVector}}, Base.var"#4#5"{ExprTools.var"#13#14"}}, offs::Int64, st::Tuple{Int64, Int64})
    @ Base .\array.jl:842
  [6] collect_to_with_first!
    @ .\array.jl:820 [inlined]
  [7] collect(itr::Base.Generator{Base.Iterators.Zip{Tuple{Vector{Symbol}, Core.SimpleVector}}, Base.var"#4#5"{ExprTools.var"#13#14"}})
    @ Base .\array.jl:794
  [8] map
    @ .\abstractarray.jl:2981 [inlined]
  [9] arguments(m::Method, sig::Type)
    @ ExprTools C:\Users\nicho\.julia\packages\ExprTools\4kw5E\src\method.jl:184
 [10] signature(m::Method; extra_hygiene::Bool)
    @ ExprTools C:\Users\nicho\.julia\packages\ExprTools\4kw5E\src\method.jl:45
 [11] signature(m::Method)
    @ ExprTools C:\Users\nicho\.julia\packages\ExprTools\4kw5E\src\method.jl:40
 [12] top-level scope
    @ REPL[11]:1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsignaturerelating to the signature function to get def from methods

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions