File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 197197 `(binding [*cljs-warning-handlers* ~handlers]
198198 ~@body))
199199
200- (def ^:private constant-counter (atom 0 ))
201-
202200(defn gen-constant-id [value]
203201 (let [prefix (cond
204202 (keyword? value) " constant$keyword$"
205203 :else
206204 (throw
207- (Exception. (str " constant type " (type value) " not supported" ))))]
208- (symbol (str prefix (string/replace (munge value) " ." " $" )))))
205+ (Exception. (str " constant type " (type value) " not supported" ))))
206+ name (-> value (str ) (subs 1 ) (string/replace " -" " _DASH_" ) (munge ) (string/replace " ." " $" ))]
207+ (symbol (str prefix name))))
209208
210209(defn- register-constant!
211210 ([val] (register-constant! nil val))
Original file line number Diff line number Diff line change 324324 ; ; actual: (not (= #{file-reloading dev client} #{file-reloading dev client core}))
325325 (is (= (set (a/ns-dependents 'utils))
326326 #{'file-reloading 'dev 'client 'core}))))
327+
328+ (deftest test-cljs-1105
329+ ; ; munge turns - into _, must preserve the dash first
330+ (is (not= (a/gen-constant-id :test-kw )
331+ (a/gen-constant-id :test_kw ))))
You can’t perform that action at this time.
0 commit comments