eliminate undeclared var warning from cljs inline caching code

This commit is contained in:
Nathan Marz 2016-05-28 21:06:43 -04:00
parent 2c52355f8d
commit f49f371eea

View file

@ -446,11 +446,14 @@
;; a bunch of checks beforehand ;; a bunch of checks beforehand
cache-id (i/gen-uuid-str) ;; used for clj cache-id (i/gen-uuid-str) ;; used for clj
cache-sym (gensym "pathcache") ;; used for cljs cache-sym (gensym "pathcache") ;; used for cljs
;; this is used to avoid warnings in cljs code about undeclared var
cache-qualified-sym (symbol (str *ns* "." cache-sym))
info-sym (gensym "info") info-sym (gensym "info")
get-cache-code (if (= platform :clj) get-cache-code (if (= platform :clj)
`(i/get-path-cache ~cache-id) `(i/get-path-cache ~cache-id)
cache-sym cache-qualified-sym
) )
add-cache-code (if (= platform :clj) add-cache-code (if (= platform :clj)
`(i/add-path-cache! ~cache-id ~info-sym) `(i/add-path-cache! ~cache-id ~info-sym)