Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPossible boundary condition in Array.slice #892
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Aug 6, 2017
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Aug 6, 2017
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
This should be fixed in Elm 0.19 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
dterhorst
commented
Aug 6, 2017
|
Thanks. |
dterhorst
closed this
Aug 6, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dterhorst commentedAug 6, 2017
•
edited
Edited 1 time
-
dterhorst
edited Aug 6, 2017 (most recent)
Version
Code
Expected Result
Actual Result
Note
Array.repeat 31 0 |> Array.slice 0 33works.Array.repeat 32 0 |> Array.slice 0 33fails.Array.repeat 33 0 |> Array.slice 0 33works.Array.repeat 33 0 |> Array.slice 0 34fails.Given
Array.repeat length 0 |> Array.slice 0 limit,the problem seems to occur any time
32 <= length < limit.A similar problem occurs with
Array.fromList:However, it only occurs when the length of the list
is
33 <= length < limitas opposed to32,so there is something slightly different about that case.