File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 744
744
mname (munge name)
745
745
delegate-name (str mname " __delegate" )]
746
746
(emitln " (function() { " )
747
- (when type
748
- (emitln " var self__ = this;" ))
749
747
(emits " var " delegate-name " = function (" )
750
748
(doseq [param params]
751
749
(emit param)
752
750
(when-not (= param (last params)) (emits " ," )))
753
751
(emitln " ){" )
752
+ (when type
753
+ (emitln " var self__ = this;" ))
754
754
(when recurs (emitln " while(true){" ))
755
755
(emits expr)
756
756
(when recurs
762
762
(if variadic
763
763
(concat (butlast params) ['var_args])
764
764
params)) " ){" )
765
+ (when type
766
+ (emitln " var self__ = this;" ))
765
767
(when variadic
766
768
(emits " var " )
767
769
(emit (last params))
Original file line number Diff line number Diff line change 1339
1339
(testing " Syntax quoted dotted symbol without namespace should resolve to itself"
1340
1340
(is (= 'clojure.core `clojure.core))))
1341
1341
1342
+ (deftype Partial [f args]
1343
+ IFn
1344
+ (-invoke [_ & a]
1345
+ (apply (apply partial f args) a)))
1346
+
1347
+ (deftest test-cljs-2133
1348
+ (testing " Invalid variadic IFn implementation should work"
1349
+ (let [p (Partial. + [1 ])]
1350
+ (p 2 ))))
1351
+
1342
1352
(comment
1343
1353
; ; ObjMap
1344
1354
; ; (let [ks (map (partial str "foo") (range 500))
You can’t perform that action at this time.
0 commit comments