Fork me on GitHub
#cljs-dev
<
2021-01-09
>
borkdude11:01:39

why does cljs type not take into account the :type key of metadata?

ClojureScript 1.10.597
cljs.user=> (type (with-meta {} {:type 'Foo}))
cljs.core/PersistentArrayMap
cljs.user=>

Clojure 1.10.1
user=> (type (with-meta {} {:type 'Foo}))
Foo

borkdude11:01:01

user=> (doc type)
-------------------------
clojure.core/type
([x])
  Returns the :type metadata of x, or its Class if none

clyfe11:01:50

cljs.user=> (doc type)
-------------------------
cljs.core/type
([x])
  Return x's constructor.
A ticket is to be made afaict

clyfe11:01:57

clj impl has an extra (or meta ... compared to cljs, easy fix