-
Notifications
You must be signed in to change notification settings - Fork 31
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
Array.getUnsafe
does not throw Not_found
if index doesn't exist in array
#172
Comments
Array.getUnsafe
doesn't throw Not_found if index
doesn't exist in array
Array.getUnsafe
doesn't throw Not_found
if index
doesn't exist in array
Array.getUnsafe
doesn't throw Not_found
if index
doesn't exist in array
Array.getUnsafe
doesn't throw Not_found
if index doesn't exist in array
Array.getUnsafe
doesn't throw Not_found
if index doesn't exist in array
Array.getUnsafe
doesn't throw Not_found if index doesn't exist in array
Array.getUnsafe
doesn't throw Not_found if index doesn't exist in arrayArray.getUnsafe
does not throw Not_found if index doesn't exist in array
Array.getUnsafe
does not throw Not_found if index doesn't exist in arrayArray.getUnsafe
does not throw Not_found
if index doesn't exist in array
dsiu
added a commit
to dsiu/rescript-stdlib-fp
that referenced
this issue
Dec 30, 2023
…'s `getExn` for `getUnsafe` instead of RescriptCore since there is a bug in RescriptCore's `getUnsafe` not raising `Not_Found` (see: rescript-lang/rescript-core#172)
Fixed by #168 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to
Core__Array.resi
,Array.getUnsafe
should throwNot_found
if the index is out of bounds. However, this is not the case; it returnsundefined
instead.ReScript Playground Link
https://github.com/rescript-association/rescript-core/blob/d5904bd82ce2fe77ad66619e66ae5ef935eb115f/src/Core__Array.resi#L811-L830
The text was updated successfully, but these errors were encountered: