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 1403
1403
(ifn-invoke-methods type type-sym form))))
1404
1404
1405
1405
(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) )]
1407
1407
(if (vector? (first meths))
1408
1408
; ; single method case
1409
1409
(core/let [meth meths]
1435
1435
(core/when-not (= p 'Object)
1436
1436
(core/let [var (ana/resolve-var (dissoc env :locals ) p)
1437
1437
minfo (core/-> var :protocol-info :methods )
1438
+ ->name (comp symbol name first)
1438
1439
[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))])
1441
1442
decmeths (core/get minfo fname ::not-found )]
1442
1443
(core/when (= decmeths ::not-found )
1443
1444
(ana/warning :protocol-invalid-method env {:protocol p :fname fname :no-such-method true }))
Original file line number Diff line number Diff line change 2936
2936
(is (= (hash (.toString #uuid " 0d1f9029-40fc-4728-8bdd-9862172d4370" ))
2937
2937
(hash (.toString (UUID. " 0d1f9029-40fc-4728-8bdd-9862172d4370" nil ))))))
2938
2938
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
+
2939
2947
(comment
2940
2948
; ; ObjMap
2941
2949
; ; (let [ks (map (partial str "foo") (range 500))
You can’t perform that action at this time.
0 commit comments