-
-
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
Iteration over typemin(Uint64):typemax(Uint64)
stops immediately and silently.
#11742
Comments
This is because
also note that indexing doesn't work:
I think this is the case for all integer types, signed and unsigned. And a lot of functions are in fact affected by this. Some mentions before #5585, #3079, #10554 (comment), #5550, |
Does changing this to |
Actually, I guess that could just be |
@mauro3 I think this only applies to @StefanKarpinski I think that makes iterating over any range that ends with |
ranges are bananas |
@simonster no wonder my test cases didn't terminate! Would it be an idea to check at range creation that it actually can work? |
This definitely feels like deja vu. I thought this was discussed in the last range overhaul. |
This was discussed in #5585 (e.g. #5585 (comment)) but I don't think we came up with a solution that didn't sacrifice performance. |
Just filed this again at #22494 |
Even checking at creation has a bit of cost, since we want range creation to be basically free. (And the LLVMPolly people would like it to be even simpler than it is now.) But that seems like the best place to do this. Alternatively we could wait for #18823 and do that check in the single-argument |
This issue is closed by #27147 |
This may be a corner case and unrealistic, but throwing an error like
length(typemin(Uint64):typemax(Uint64))
would be nice at least.The text was updated successfully, but these errors were encountered: