rescript-core
rescript-core copied to clipboard
`Array.getUnsafe` does not throw `Not_found` if index doesn't exist in array
According to Core__Array.resi, Array.getUnsafe should throw Not_found if the index is out of bounds. However, this is not the case; it returns undefined instead.
https://github.com/rescript-association/rescript-core/blob/d5904bd82ce2fe77ad66619e66ae5ef935eb115f/src/Core__Array.resi#L811-L830
Fixed by https://github.com/rescript-association/rescript-core/pull/168