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

0 votes
in core.match by

Example:

user=> (require '[clojure.core.match :as m]) nil user=> (m/match [[1 2 3]] [(x :<< first)] x) IllegalArgumentException No method in multimethod 'to-source' for dispatch value: null clojure.lang.MultiFn.getFn (MultiFn.java:156)

It seems this can be fixed by adding a dummy to-source for wildcards:

`
user=> (defmethod m/to-source nil [pattern ocr]
(if (m/wildcard-pattern? pattern)

true
(throw (AssertionError. (str "Don't know how to emit code for: " pattern)))))

object[clojure.lang.MultiFn 0x4bb9f7d4 "clojure.lang.MultiFn@4bb9f7d4"]

user=> (m/match [[1 2 3]] [(x :<< first)] x)<br> 1
`

1 Answer

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