Details
Description
When using the subvec function with a as a parameter vector and a range that is not in the original vector, the function returns a value:
(subvec [1 2 3] 0 4) => [1 2 3 nil]
However, when using with seqs, it works as it supposed to:
(subvec (range 3) 0 4) => ERROR: Index out of bounds
This is because the validation of ranges is not happening at build time of the subvec type, this bug contains a patch that adds a new private `build-subvec` function into cljs.core.
Attachments
Activity
Roman Gonzalez
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | cljs_subvec.patch [ 11698 ] |
Roman Gonzalez
made changes -
| Attachment | cljs_subvec_revised.patch [ 11704 ] |
Roman Gonzalez
made changes -
| Attachment | cljs_subvec_revised1.patch [ 11705 ] |
David Nolen
made changes -
| Resolution | Completed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |