We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repro:
(ns user (:require [clojure.pprint :as pprint])) (defprotocol Schema) (defrecord ASchema [] Schema) (defrecord Foo [x]) (defmethod clojure.pprint/simple-dispatch user.Schema [_] (println "PRETTY")) (prefer-method clojure.pprint/simple-dispatch user.Schema clojure.lang.IRecord) (prefer-method clojure.pprint/simple-dispatch user.Schema java.util.Map) (prefer-method clojure.pprint/simple-dispatch user.Schema clojure.lang.IPersistentMap) (clojure.pprint/pprint (ASchema.))
This should print "PRETTY".
"PRETTY"
cc @frenchy64
The text was updated successfully, but these errors were encountered:
I'm guessing the most general fix for this is in clojure.core/isa?. Also worth testing print-method.
clojure.core/isa?
print-method
./bb Babashka v0.8.3-SNAPSHOT REPL. Use :repl/quit or :repl/exit to quit the REPL. Clojure rocks, Bash reaches. user=> (defprotocol P) (defrecord R [] P) #'user/P user=> user.R user=> (isa? user.R user.P) false
clj Clojure 1.11.1 user=> (defprotocol P) (defrecord R [] P) P user.R user=> (isa? user.R user.P) true
Sorry, something went wrong.
No branches or pull requests
Repro:
This should print
"PRETTY"
.cc @frenchy64
The text was updated successfully, but these errors were encountered: