Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.5
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
-
Approval:Ok
Description
Google group thread: https://mail.google.com/mail/?shva=1#label/clojure/1365e058eaf0d5fa
Vectors returned by subvec correctly disallow access to elements after their end, but not before their beginning.
Clojure 1.3.0
user=> (def v1 (vec (range 100)))
#'user/v1
user=> (def v2 (subvec v1 50 52))
#'user/v2
user=> (v2 3)
IndexOutOfBoundsException clojure.lang.APersistentVector$SubVector.nth (APersistentVector.java:526)
user=> (v2 -48)
2
Attachments
Activity
Andy Fingerhut
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | clj-962-subvec-nth-throws-on-negative-index-patch1.txt [ 11023 ] |
Andy Fingerhut
made changes -
| Patch | Code and Test [ 10002 ] |
Rich Hickey
made changes -
| Fix Version/s | Release 1.5 [ 10150 ] |
Alan Dipert
made changes -
| Approval | Screened [ 10004 ] |
Rich Hickey
made changes -
| Approval | Screened [ 10004 ] | Ok [ 10007 ] |
Andy Fingerhut
made changes -
| Attachment | clj-962-subvec-nth-throws-on-negative-index-patch2.txt [ 11189 ] |
Andy Fingerhut
made changes -
| Attachment | clj-962-subvec-nth-throws-on-negative-index-patch1.txt [ 11023 ] |
Stuart Halloway
made changes -
| Resolution | Completed [ 1 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |