New issue
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
Custom formatters (print-method) don't work via Java-style interop #1493
Projects
Comments
(defprotocol Version (stringify [this] "Get string representation"))
(deftype QID [a b c d] Version (stringify [_] "test"))
(defmethod print-method QID [object out]
(.write out (stringify object)))
(println "HERE")
(printin (.stringify (QID. 4 0 0 1)))
(println (QID. 4 0 0 1)) (defprotocol Version (toString [this] "Get string representation"))
(deftype QID [a b c d] Version (toString [-] "test"))
(println "HERE")
(println (. toString (QID. 4 0 0 1)))
(println (QID. 4 0 0 1)) |
So |
borkdude
changed the title
Custom formatters (print-method) don't work
Custom formatters (print-method) don't work via Java-style interop
Feb 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[ To keep development of this project going, consider sponsoring. If you are
already a sponsor, thank you! ]
version
babashka v1.1.172
platform
Current macOS
problem
print-method
seems broken.repro
expected behavior
Clojure output in the screenshot is the expected behaviour.
The text was updated successfully, but these errors were encountered: