JuliaStaging / JuliaStaging/GeneralizedGenerated.jl
Error with vararg in `@gg`
- Dominant language
- Julia
- Stars
- 89
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
If a generalized generated function has a vararg input the following error occurs
```julia
@gg function f(x...)
quote
x
end
end
julia> f(1,2,3)
ERROR: MethodError: Cannot `convert` an object of type Expr to an object of type Symbol
Closest candidates are:
convert(::Type{T}, ::T) where T at essentials.jl:168
Symbol(::Any...) at strings/basic.jl:206
Stacktrace:
[1] GeneralizedGenerated.NGG.Argument(::Expr, ::Nothing, ::GeneralizedGenerated.NGG.Unset) at /home/fredrikb/.julia/packages/GeneralizedGenerated/EBwdX/src/ngg/runtime_fns.jl:19
[2] of_args(::Array{GeneralizedGenerated.FuncArg,1}) at /home/fredrikb/.julia/packages/GeneralizedGenerated/EBwdX/src/func_arg_decs.jl:62
[3] ##GeneralizedGenerated 245#737#61 at /home/fredrikb/.julia/packages/GeneralizedGenerated/EBwdX/src/closure_conv.jl:45 [inlined]
[4] ##GeneralizedGenerated 243#735#60 at ./none:0 [inlined]
[5] ##GeneralizedGenerated 236#728#59 at ./none:0 [inlined]
[6] ##GeneralizedGenerated 234#726#58 at ./none:0 [inlined]
[7] (::GeneralizedGenerated.var"#conv#55"{Module})(::Expr) at /home/fredrikb/.julia/packages/GeneralizedGenerated/EBwdX/src/closure_conv.jl:27
[8] closure_conv(::Module, ::Expr) at /home/fredrikb/.julia/packages/GeneralizedGenerated/EBwdX/src/closure_conv.jl:78
[9] #s34#362(::Any, ::Any) at /home/fredrikb/.julia/packages/GeneralizedGenerated/EBwdX/src/closure_conv.jl:121
[10] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at ./boot.jl:524
[11] top-level scope at none:0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.