<< Back to previous view

[MATCH-61] Exception thrown when matching using :seq when there is a seq call in the tail of the occurrences Created: 22/Jun/12  Updated: 28/Jul/13  Resolved: 20/Jun/13

Status: Closed
Project: core.match
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Emma Tosch Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: bug, seq

with Clojure 1.3


The following match throws:

(let [q '(a) y '(b) z '(c)]
  (match [q (seq y) z]
    [([_] :seq) _ _] 'a
    [_ _ _] 'b))

Looking at the macro expansion there's something clearly wrong simply with the fact that the seq expression occurs in multiple places instead of just at the beginning of the macro expansion.

Comment by Emma Tosch [ 22/Jun/12 5:33 PM ]

Two expressions, macro-expanded. The only difference between the expressions is that the second occurrence in the second expression is seq'ed. The second let is the one throwing the exception; it's the one with the binding

(clojure.core/let [q_tail_3472 q_tail_3472
q_head_3471 q_head_3471
ocr-3470 (seq y)
z z]

Comment by David Nolen [ 20/Jun/13 7:35 AM ]

fixed, http://github.com/clojure/core.match/commit/7b02b83478862a8fcaa3367871d043d4a40d9413

Generated at Wed Oct 18 22:28:47 CDT 2017 using JIRA 4.4#649-r158309.