Skip to content

Array.getUnsafe does not throw Not_found if index doesn't exist in array #172

Closed
@dsiu

Description

@dsiu

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.

ReScript Playground Link

https://github.com/rescript-association/rescript-core/blob/d5904bd82ce2fe77ad66619e66ae5ef935eb115f/src/Core__Array.resi#L811-L830

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions