Fork me on GitHub
#meander
<
2020-07-28
>
magnusdk12:07:27

Hi, the following expression causes a ClassCastException (`clojure.lang.PersistentList cannot be cast to clojure.lang.Named`):

(m/match ((partial inc) 0)
   ?a
   ?a)
Bug/known?

magnusdk12:07:14

The first arg for match is specced as any? so I’d assume this would work :thinking_face: An obvious workaround is to write:

(let [res ((partial inc) 0)]
  (m/match res
    ?a
    ?a))

magnusdk12:07:05

I stumbled across it after writing something akin to this:

(def *some-slow-to-init-fn (delay inc))
(-> (@*some-slow-to-init-fn 0)
    (m/match ?a ?a))

Jimmy Miller13:07:10

I didn't know about this issue. But I have a good guess as to what is causing it. Will try to get a fix out asap.

magnusdk13:07:48

Alright, cool 👍 It’s not stopping us in any way, so no need to rush for our sake 🙂 Thanks, and have a nice day!

noprompt16:07:09

Fixed, will deploy a new release shortly.

👏 3
noprompt17:07:47

[meander/epsilon "0.0.480"]
• Fixes that bug

👍 6