We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeb86ae commit 29655a2Copy full SHA for 29655a2
src/clj/cljs/core.clj
@@ -791,8 +791,11 @@
791
792
(defn add-obj-methods [type type-sym sigs]
793
(map (fn [[f & meths :as form]]
794
- `(set! ~(extend-prefix type-sym f)
795
- ~(with-meta `(fn ~@(map #(adapt-obj-params type %) meths)) (meta form))))
+ (let [[f meths] (if (vector? (first meths))
+ [f [(rest form)]]
796
+ [f meths])]
797
+ `(set! ~(extend-prefix type-sym f)
798
+ ~(with-meta `(fn ~@(map #(adapt-obj-params type %) meths)) (meta form)))))
799
sigs))
800
801
(defn ifn-invoke-methods [type type-sym [f & meths :as form]]
0 commit comments