Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MATCH-83 & MATCH-84: vector patterns with rest pattern broken

aim for correctness, the attempt to share tests between vector
patterns with and without rest patterns was problematic. We'll
reconsider this optimization at some future point.
  • Loading branch information...
commit ae2bc9c581c2e95b24270498549e97d59f379b1f 1 parent 0430c6c
@swannodette swannodette authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/main/clojure/clojure/core/match.clj
View
7 src/main/clojure/clojure/core/match.clj
@@ -1595,11 +1595,8 @@ col with the first column and compile the result"
(defmethod groupable? [VectorPattern VectorPattern]
[a b]
- (cond
- (= (:size a) (:size b)) true
- (and (:rest? a) (<= (:size a) (:size b))) true
- (and (:rest? b) (<= (:size b) (:size a))) true
- :else false))
+ (and (= (:rest? a) (:rest? b))
+ (= (:size a) (:size b))))
;; =============================================================================
;; # Interface
Please sign in to comment.
Something went wrong with that request. Please try again.