<< Back to previous view

[MATCH-88] different semantics at runtime versus compile time Created: 27/Oct/13  Updated: 27/Oct/13  Resolved: 27/Oct/13

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

Type: Defect Priority: Major
Reporter: kovas boguta Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None


 Description   

((fn [x] (match x [1 1] 1 :else 2)) [1]) ->
2

(match [1] [1 1] 1 :else 2) ->
AssertionError Pattern row 1: Pattern row has differing number of patterns.



 Comments   
Comment by David Nolen [ 27/Oct/13 8:17 PM ]

This is not actually a bug, but perhaps an unfortunate side effect of a syntactic convenience. When using the vector syntax you not matching on a vector - just a list of local bindings. So in the first case you're matching a specific local binding, and in the second your matching a single value.

Generated at Fri Oct 24 14:06:08 CDT 2014 using JIRA 4.4#649-r158309.