File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 14031403 (ifn-invoke-methods type type-sym form))))
14041404
14051405(core/defn- add-proto-methods* [pprefix type type-sym [f & meths :as form]]
1406- (core/let [pf (core/str pprefix f )]
1406+ (core/let [pf (core/str pprefix ( name f) )]
14071407 (if (vector? (first meths))
14081408 ; ; single method case
14091409 (core/let [meth meths]
14351435 (core/when-not (= p 'Object)
14361436 (core/let [var (ana/resolve-var (dissoc env :locals ) p)
14371437 minfo (core/-> var :protocol-info :methods )
1438+ ->name (comp symbol name first)
14381439 [fname sigs] (if (core/vector? (second method))
1439- [(first method) [(second method)]]
1440- [(first method) (map first (rest method))])
1440+ [(->name method) [(second method)]]
1441+ [(->name method) (map first (rest method))])
14411442 decmeths (core/get minfo fname ::not-found )]
14421443 (core/when (= decmeths ::not-found )
14431444 (ana/warning :protocol-invalid-method env {:protocol p :fname fname :no-such-method true }))
Original file line number Diff line number Diff line change 29362936 (is (= (hash (.toString #uuid " 0d1f9029-40fc-4728-8bdd-9862172d4370" ))
29372937 (hash (.toString (UUID. " 0d1f9029-40fc-4728-8bdd-9862172d4370" nil ))))))
29382938
2939+ (defprotocol IFooBar
2940+ (a-method [t]))
2941+
2942+ (deftest test-cljs-1451
2943+ (is (= " foobar" (a-method (reify
2944+ IFooBar
2945+ (cljs.core-test/a-method [_] " foobar" ))))))
2946+
29392947(comment
29402948 ; ; ObjMap
29412949 ; ; (let [ks (map (partial str "foo") (range 500))
You can’t perform that action at this time.
0 commit comments