Skip to content

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

@frenchy64

Description

@frenchy64

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))

Metadata

Metadata

Labels

category:runtimeActual Clojure code, core libs, and all the C++ code in `jank::runtime`.help wanted

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions