You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With latest git master, in the function below, the type of len is inferred correctly, but not lev is marked as Core.Box. Removing the ntuple call fixes this. In 0.4, the types of both variables are inferred correctly.
Feel free to close if Core.Box isn't actually an indication of type instability (I'm merely trusting @code_warntype here).
functionf{N}(x::NTuple{N})
lev = [length(y) for y in x]
len = [length(y) for y in x]
ntuple(i ->length(lev[i]), N)
end@code_warntypef((1,2))
The text was updated successfully, but these errors were encountered:
Ah, I had only looked for Core.Box, but the name wasn't fully qualified a few weeks ago. At least, this issue will help people doing a simple search as I did.
With latest git master, in the function below, the type of
len
is inferred correctly, but notlev
is marked asCore.Box
. Removing thentuple
call fixes this. In 0.4, the types of both variables are inferred correctly.Feel free to close if
Core.Box
isn't actually an indication of type instability (I'm merely trusting@code_warntype
here).The text was updated successfully, but these errors were encountered: