Welcome! Please see the About page for a little more info on how this works.

+1 vote
in ClojureScript by

A protocol like below will work in Clojure without issue, but in ClojureScript the _'s will apparently (quietly) override each other left to right.

(defprotocol Linkable
  (-href [_ _ _]))

Even if the extend-protocol has unique names for the args, the dispatch seems to happen on the last argument.

Repro at https://github.com/valerauko/proto-repro/commit/a8ad51a225ed44ed134b28a18cc83d272d0d8321

Using distinct argument names in the defprotocol solves the issue. I think if it doesn't / can't work like in JVM Clojure it should warn about this issue.

1 Answer

0 votes
by

https://clojure.atlassian.net/browse/CLJS-3431
This issue was made in response

...