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

length returns 0 for some non-emtpy ranges #8531

Closed
rfourquet opened this issue Sep 30, 2014 · 1 comment
Closed

length returns 0 for some non-emtpy ranges #8531

rfourquet opened this issue Sep 30, 2014 · 1 comment

Comments

@rfourquet
Copy link
Member

This contradicts the docs, e.g.: length(typemin(Int8):typemax(Int8)) == 0.
Also, length(typemin(Int):typemax(Int)) triggers an overflow error (but this is a less new problem).

@rfourquet
Copy link
Member Author

Maybe worse: length(typemin(Int8):(typemax(Int8)-int8(1)))==-1.
This does not seem necessary as the length returns an Int.

rfourquet added a commit to rfourquet/julia that referenced this issue Sep 30, 2014
rfourquet added a commit to rfourquet/julia that referenced this issue Sep 30, 2014
timholy added a commit that referenced this issue Sep 30, 2014
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

1 participant