We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ad6d5d commit ca57179Copy full SHA for ca57179
1 file changed
src/test/clojure/cljs/analyzer_tests.clj
@@ -787,4 +787,22 @@
787
(map (comp :externs second)
788
(get @test-cenv ::a/namespaces))))))
789
790
+ ;; wrong
791
+ (let [test-cenv (atom {::a/externs (externs/externs-map
792
+ (closure/load-externs
793
+ {:externs ["src/test/externs/test.js"]}))})]
794
+ (binding [a/*cljs-ns* a/*cljs-ns*
795
+ a/*cljs-warnings* (assoc a/*cljs-warnings* :infer-warning true)]
796
+ (e/with-compiler-env test-cenv
797
+ (a/analyze-form-seq
798
+ '[(fn [^js/Foo.Bar x]
799
+ (let [z (.baz x)]
800
+ (.-wozz z)))]))
801
+ (cc/emit-externs
802
+ (reduce util/map-merge {}
803
+ (map (comp :externs second)
804
+ (get @test-cenv ::a/namespaces))))))
805
+
806
+ ;; TODO: test (def foo (js/require "bar.js")) pattern
807
808
)
0 commit comments