JuliaLang/julia — Issue #469: Int64 Ranges with negative steps expanded in arrays seem not to work on Darwin
Author: robert-chiniquy
Created: 2012-02-26 17:17:04+00:00
State: open

julia> [50.0:-1.0:40.0]
[50.0, 49.0, 48.0, 47.0, 46.0, 45.0, 44.0, 43.0, 42.0, 41.0, 40.0]

julia> [50:-1:40]
[140518254067184, 140518254067256, 140518254067328, 140518254067400 ... ]

julia> for i = 50:-1:40
print(i)
end
5049484746454443424140
julia> linspace(50,40,11)
[50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40]
julia>

My build is up to the latest, all tests seem to pass, a few other people on IRC using macs had this same issue.

The above expansion of [50:-1:40] was done in a Julia runtime which had been up for a bit. If I restart the repl and evaluate it:

julia> [50:-1:40]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

So this looks to me like the array memory isn't being assigned to when steps are negative integers.