This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-11
Channels
- # announcements (38)
- # babashka (5)
- # beginners (26)
- # calva (26)
- # cider (1)
- # clj-kondo (36)
- # cljdoc (17)
- # cljs-dev (31)
- # clojure (39)
- # clojure-australia (9)
- # clojure-berlin (2)
- # clojure-dev (31)
- # clojure-europe (22)
- # clojure-france (3)
- # clojure-italy (7)
- # clojure-nl (5)
- # clojure-norway (5)
- # clojure-spec (28)
- # clojure-uk (9)
- # clojured (20)
- # clojurescript (24)
- # community-development (2)
- # conjure (32)
- # core-async (7)
- # cryogen (6)
- # datomic (2)
- # duct (6)
- # fulcro (6)
- # graalvm (53)
- # introduce-yourself (2)
- # jobs (2)
- # luminus (2)
- # nrepl (2)
- # off-topic (35)
- # re-frame (17)
- # reveal (8)
- # shadow-cljs (27)
- # testing (2)
- # xtdb (8)
I would consider this a bug. The ordering of choices was carefully chosen here in Clojure.
btw satisfies? returns false when protocol is implemented via meta. the behavior in this case is not documented in the function doc.
that is a separate issue and does have a CLJ jira
vote https://ask.clojure.org/index.php/4622/satisfies-doesnt-work-instance-based-protocol-polymorphism?show=4622#q4622 if you like
my bad on that one. currently pretty busy but I can try to squeeze in a patch if you want, maybe next week.
Posted this in #clojurescript, not realizing this channel existed, but thinking it's maybe more appropriate here?
ohhh, gotcha - my bad, I misinterpreted. apologies! /me slinks back to #clojurescript 😉
https://github.com/clojure/clojurescript/commit/01c65fe2b8e038cda00e2e565f2750dbfd81b596
@dnolen I think that still fails with :static-fns true
. the direct property check/invoke still happens before hitting the dispatch function. somewhere in emit*
:invoke
IIRC
hmm I thought the protocol property check was the default (with static-fns) rather than an edge case
https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/compiler.cljc#L1242
(let [x (with-meta (SomeMetaImpl. 2) {`ext-meta-protocol (fn [_] 1)})]
(is (= 1 (ext-meta-protocol x))))