Fork me on GitHub
#missionary
<
2024-04-05
>
nivekuil04:04:53

;; this is fine
(.readLine (io/reader (java.io.ByteArrayInputStream. (.getBytes "hi"))))

;; this errors: No matching field found: readLine for class java.io.BufferedReader
(m/? (m/sp (.readLine (io/reader (java.io.ByteArrayInputStream. (.getBytes "hi"))))))
strange behavior, b.36, clojure 1.12.0-alpha8

Andrew Wilcox05:04:24

I noticed the same issue, and hadn't put together an example yet. An easy workaround is put Java method calls in a Clojure fn, and call the Clojure fn from within m/sp.