-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
0x00:0xff is empty #6262
Comments
Possibly related: julia> for i in 0x00:0xff #no output
println(i)
end
julia> length(0x00:0xff)
256 |
I think I raised an issue about that exact behavior at one point in the past, but thought it had been fixed once before. |
I noticed this yesterday for Uint16. |
Isn't this a dup of #5550? # base/ranges.jl
done{T<:Integer}(r::Range1{T}, i) = i==oftype(T, r.start+r.len)
julia> dump(convert(Uint8, 0):convert(Uint8, 255))
Range1{Uint8}
start: Uint8 0
len: Int64 256
julia> oftype(Uint8, 0+256)
0x00 The iteration seems to be done before it has started because of overflow. The allocated array will not be written to and thus appear random. |
julia> done(a,start(convert(Uint8, 0):convert(Uint8, 255)))
true |
Yes, #5550 not quite, because in |
This is also part of #5585, and is fixed on my branch jb/newrange1. |
On my system, this produces seemingly random output.
The text was updated successfully, but these errors were encountered: