Skip to content

Commit 04d0b92

Browse files
mfikesdnolen
authored andcommitted
CLJS-1481: self-host: defprotocol regressed with arity error
Need to expicilty invoke cljs.core/->
1 parent 8569461 commit 04d0b92

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/main/clojure/cljs/core.cljc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1868,7 +1868,7 @@
18681868
(throw
18691869
(missing-protocol
18701870
~(core/str psym "." fname) ~(first sig))))))))))
1871-
psym (-> psym
1871+
psym (core/-> psym
18721872
(vary-meta update-in [:jsdoc] conj
18731873
"@interface")
18741874
(vary-meta assoc-in [:protocol-info :methods]

src/test/self/self_host/test.cljs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,17 @@
5151

5252
(deftest test-analyze-str
5353
(async done
54-
(let [l (latch 1 done)]
54+
(let [l (latch 2 done)]
5555
(cljs/analyze-str st "(+ 1 1)" nil
5656
{:context :expr}
5757
(fn [{:keys [error value]}]
5858
(is (nil? error))
5959
(is (= :js (:op value)))
60+
(inc! l)))
61+
(cljs/analyze-str st "(defprotocol IFoo)" nil
62+
{:context :expr}
63+
(fn [{:keys [error value]}]
64+
(is (nil? error))
6065
(inc! l))))))
6166

6267
(deftest test-compile-str

0 commit comments

Comments
 (0)