-
Notifications
You must be signed in to change notification settings - Fork 4
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
Inferrability failure #2
Comments
Hmm, julia> @code_warntype fulltype(Mine{3})
Variables:
#self#::ComputedFieldTypes.#fulltype
#unused#::Any
Body:
begin
return (Core.apply_type)(Main.Mine, $(Expr(:static_parameter, 1)), $(Expr(:invoke, MethodInstance for power_by_squaring(::Int64, ::Int64), :(Base.power_by_squaring), 2, :($(Expr(:static_parameter, 1))))))::Type{Mine{3,_}} where _
end::Type{Mine{3,_}} where _ A potential workaround is OK for now but may not in the future. |
It's going to be difficult to teach inference that |
Got it, I imagined there was more |
It seems like it is going to be difficult to teach inference that This package is only intended as a demonstration of what JuliaLang/julia#18466 would look like if implemented in Base. It's not intended as a mechanism to make uninferrable functions magically computable. (which is pretty much the same discussion as happened with mauro3/SimpleTraits.jl#39, if you wish to revisit the issue) |
It's not helped if one changes the
ntuple
call tontuple(identity, 2^N)
.The text was updated successfully, but these errors were encountered: