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

keyword differs from CLJ/S for non-strings #246

Open
frenchy64 opened this issue Feb 6, 2025 · 1 comment
Open

keyword differs from CLJ/S for non-strings #246

frenchy64 opened this issue Feb 6, 2025 · 1 comment

Comments

@frenchy64
Copy link
Contributor

frenchy64 commented Feb 6, 2025

Clojure and CLJS do their own thing but jank does a third thing in these cases.

;; jank
clojure.core=> (keyword nil)
:nil
clojure.core=> (keyword nil "abc")
:nil/abc
clojure.core=> (keyword "abc" :abc)
:abc/:abc
clojure.core=> (keyword :asdf :abc)
::asdf/:abc


;; via clojure-test

FAIL in (nil) (nil:nil)
expected: (nil? (keyword nil))
  actual: (not (nil? :nil))

FAIL in (nil) (nil:nil)
expected: (= :abc (keyword nil "abc"))
  actual: (not (= :abc :nil/abc))
@frenchy64 frenchy64 changed the title (keyword nil) should be nil not :nil keyword nil handling differs from CLJ/S Feb 6, 2025
@frenchy64 frenchy64 changed the title keyword nil handling differs from CLJ/S keyword differs from CLJ/S for non-strings Feb 6, 2025
@jeaye
Copy link
Member

jeaye commented Feb 6, 2025

This is a side effect of #241, I believe.

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

No branches or pull requests

2 participants