[MATCH-56] IndexOutOfBoundsException when matching empty vector Created: 27/Mar/12 Updated: 27/Mar/12 |
|
| Status: | Open |
| Project: | core.match |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Greg Chapman | Assignee: | David Nolen |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Clojure 1.3 |
||
| Attachments: |
|
| Description |
|
Using the latest core.match: user=> (let [x []] (match [x] [[h & t]] [h t] :else :nomatch)) Not sure if this is the best fix, but I resolved this specific case by slightly changing subvec-inline (see attached diff). |
| Comments |
| Comment by David Nolen [ 27/Mar/12 10:28 AM ] |
|
Thanks for the report. The patch is not going to work - we should be checking that the vector has at least one item. |