We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ct_enable
Vararg
Here's a MWE:
julia> @ct_enable function f(x::Vararg{Any, N}) where {N} N end ERROR: TypeError: in TypeVar, in upper bound, expected Type, got Vararg{Any, N} Stacktrace: [1] TypeVar(n::Symbol, ub::Any) @ Core ./boot.jl:254 [2] top-level scope @ REPL[24]:1
and here's what's going wrong:
julia> @macroexpand1 @ct_enable function f(x::Vararg{Any, N}) where {N} N end quote #= REPL[25]:1 =# function f(x::Vararg{Any, N}; ) where N (CompTime.comptime)(f, x) end #= REPL[25]:1 =# function CompTime.generate_code(::(typeof)(f), ::(Type){<:Vararg{Any, N}}; ) where N # <-------- This is bad $(Expr(:copyast, :($(QuoteNode(quote #= REPL[25]:1 =# #= REPL[25]:2 =# N end))))) end #= REPL[25]:1 =# function CompTime.comptime(::(typeof)(f), x::Vararg{Any, N}; ) where N #= /home/mason/.julia/packages/CompTime/Ppb3B/src/CompTime.jl:137 =# if $(Expr(:generated)) #= /home/mason/.julia/packages/CompTime/Ppb3B/src/CompTime.jl:138 =# (CompTime.generate_code)(f, Vararg{Any, N}) else #= /home/mason/.julia/packages/CompTime/Ppb3B/src/CompTime.jl:140 =# $(Expr(:meta, :generated_only)) end end #= REPL[25]:1 =# function CompTime.runtime(::(typeof)(f), x::Vararg{Any, N}; ) where N #= REPL[25]:1 =# #= REPL[25]:2 =# N end end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here's a MWE:
and here's what's going wrong:
The text was updated successfully, but these errors were encountered: