Skip to content

Commit 561d65a

Browse files
committed
* test assertion that we can figure out the return even if the ctor is bound to a local
1 parent 16ec711 commit 561d65a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/clojure/cljs/externs_infer_tests.clj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@
157157
(-> (binding [ana/*cljs-ns* ana/*cljs-ns*]
158158
(env/with-compiler-env (env/default-compiler-env)
159159
(analyze (ana/empty-env) '(js/Number.isNaN 1))))
160+
:tag)))
161+
(is (= 'js/Boolean
162+
(-> (binding [ana/*cljs-ns* ana/*cljs-ns*]
163+
(env/with-compiler-env (env/default-compiler-env)
164+
(analyze (ana/empty-env) '(let [x js/Number]
165+
(.isNaN x 1)))))
160166
:tag))))
161167

162168
(deftest test-externs-infer

0 commit comments

Comments
 (0)