Skip to content
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 object toString not respected in str #1494

Open
jakub-stastny opened this issue Feb 14, 2023 · 0 comments
Open

Custom object toString not respected in str #1494

jakub-stastny opened this issue Feb 14, 2023 · 0 comments

Comments

@jakub-stastny
Copy link

[ To keep development of this project going, consider sponsoring. If you are
already a sponsor, thank you! ]

version

babashka v1.1.172

platform

Latest macOS on MB Air M2.

problem

toString is not respected when converting an object to string via (str obj).

screenshot_2023-02-14_at_11 13 15_720

repro

(deftype F [] Object (toString [_] "foo"))
(str (->F))

expected behavior

Return "foo" as Clojure does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant