Skip to content

Commit aa4f636

Browse files
author
dnolen
committed
example showing that we don't preserve tag information
1 parent 2e59fce commit aa4f636

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/test/clojure/cljs/analyzer_tests.clj

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,27 @@
688688
z)))))
689689
:tag meta :prefix))))
690690

691+
(comment
692+
(binding [a/*cljs-ns* a/*cljs-ns*]
693+
(a/no-warn
694+
(e/with-compiler-env externs-cenv
695+
(a/analyze (a/empty-env)
696+
'(let [React (js/require "react")]
697+
React)))))
698+
699+
;; FIXME: we don't preserve tag information
700+
(binding [a/*cljs-ns* a/*cljs-ns*]
701+
(a/no-warn
702+
(e/with-compiler-env externs-cenv
703+
(let [aenv (a/empty-env)
704+
_ (a/analyze aenv '(ns foo.core))
705+
aenv' (assoc-in aenv [:ns :name] 'foo.core)
706+
_ (a/analyze aenv' '(def x 1))]
707+
(dissoc (a/analyze-symbol (assoc-in aenv [:ns :name] 'foo.core) 'x) :env)
708+
;(get-in @externs-cenv [::a/namespaces 'foo.core])
709+
))))
710+
)
711+
691712
(comment
692713
(require '[cljs.compiler :as cc])
693714
(require '[cljs.closure :as closure])

0 commit comments

Comments
 (0)