Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.match by
For example:

user=> (let [x 5] (m/match x ([] :seq) true :else false))
IllegalArgumentException Don't know how to create ISeq from: java.lang.Long  clojure.lang.RT.seqFrom (RT.java:542)


The problem appears to be that empty seq patterns are converted to LiteralPatterns for (). IPatternCompile for LiteralPatterns checks if the literal is () -- if so it emits an {{empty?}} test without any check to see if the ocr is {{Seqable}}.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/MATCH-120 (reported by glchapman)
...