Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Clojure 1.3
Description
Using the latest core.match:
user=> (let [x []] (match [x] [[h & t]] [h t] :else :nomatch))
IndexOutOfBoundsException clojure.lang.RT.subvec (RT.java:1451)
Not sure if this is the best fix, but I resolved this specific case by slightly changing subvec-inline (see attached diff).
Attachments
Activity
David Nolen
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | In Progress [ 3 ] |
David Nolen
made changes -
| Description |
Using the latest core.match:
user=> (let [x []] (match [x] [[h & t]] [h t] :else :nomatch)) IndexOutOfBoundsException clojure.lang.RT.subvec (RT.java:1451) Not sure if this is the best fix, but I resolved this specific case by slightly changing subvec-inline (see attached diff). |
Using the latest core.match:
{code} user=> (let [x []] (match [x] [[h & t]] [h t] :else :nomatch)) IndexOutOfBoundsException clojure.lang.RT.subvec (RT.java:1451) {code} Not sure if this is the best fix, but I resolved this specific case by slightly changing subvec-inline (see attached diff). |
David Nolen
made changes -
| Resolution | Completed [ 1 ] | |
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
Thanks for the report. The patch is not going to work - we should be checking that the vector has at least one item.