-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
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
Improve inference for interpolated tuple parameters in stagedfunctions #10191
Comments
It seems like this works: julia> stagedfunction bar{T}(x::Foo{T})
return :($(Foo{T})())
end
bar (generic function with 1 method)
julia> @code_warntype bar(Foo{(1,2)}())
Variables:
x::Foo{(1,2)}
Body:
begin
return $(Expr(:new, Foo{(1,2)}))
end::Foo{(1,2)} although it would be better if what you wrote worked as well. |
Thanks, Simon, that workaround does the trick perfectly. |
mbauman
added a commit
to JuliaArrays/AxisArrays.jl
that referenced
this issue
Feb 28, 2015
Requires JuliaLang/julia#10331. But I think it is also running into a MAX_TUPLE_LEN issue, which is messing up my workaround for JuliaLang/julia#10191. Needs tests, too.
mbauman
added a commit
to JuliaArrays/AxisArrays.jl
that referenced
this issue
Jun 2, 2015
Requires JuliaLang/julia#10331. But I think it is also running into a MAX_TUPLE_LEN issue, which is messing up my workaround for JuliaLang/julia#10191. Needs tests, too.
My original example is now fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would it be
possibleeasy to improve the inference here?Cc @Keno. This seems like an extension of #9016 (which makes the inference for the normal function equivalent concrete).
The text was updated successfully, but these errors were encountered: