Skip to content
Browse files

Added tests for this, including use of self-call

  • Loading branch information...
1 parent cb3932c commit afeeef7410649e56d5e358911e0108c131340f29 @fogus fogus committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 test/cljs/cljs/core_test.cljs
View
8 test/cljs/cljs/core_test.cljs
@@ -729,11 +729,13 @@
(let [obj (js* "{}")]
(extend-object obj
{:foo #(do 42)
- :bar #(+ 100 (. js/this (foo)))
- :baz #(+ % %2)})
+ :bar #(+ 100 (. js/this (foo))) ;; warning is good here
+ :baz #(+ % %2)
+ :qux #(+ 100 (. obj baz 1 2))}) ;; avoids warning
(assert (= 42 (. obj (foo))))
(assert (= 142 (. obj (bar))))
- (assert (= 3 (. obj baz 1 2))))
+ (assert (= 3 (. obj baz 1 2)))
+ (assert (= 103 (. obj (qux)))))
:ok)

0 comments on commit afeeef7

Please sign in to comment.
Something went wrong with that request. Please try again.