Skip to content
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

Iterating over typemin(Int):typemax(Int) does nothing #15935

Closed
hayd opened this issue Apr 19, 2016 · 2 comments
Closed

Iterating over typemin(Int):typemax(Int) does nothing #15935

hayd opened this issue Apr 19, 2016 · 2 comments

Comments

@hayd
Copy link
Member

hayd commented Apr 19, 2016

julia> for i in typemin(Int):typemax(Int)
         i == typemin(Int) && (println(i); break)
       end

julia> for i in typemin(Int32):typemax(Int32)
         i == typemin(Int32) && (println(i); break)
       end
-2147483648

Presumably this is due to the conversion to Int.

If this is not fixable should typemin(Int):typemax(Int) be disallowed or warned about in the docs (perhaps it is already)?

@bicycle1885
Copy link
Member

Maybe a dup of #11742.

@yuyichao
Copy link
Contributor

Dup of #11742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants