File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 618
618
" defs name to have the root value of init iff the named var has no root value,
619
619
else init is unevaluated"
620
620
[x init]
621
- `(when-not (exists? ~x)
622
- (def ~x ~init )))
621
+ (core/let [qualified (if (namespace x)
622
+ x
623
+ (symbol (core/str (core/-> &env :ns :name )) (name x)))]
624
+ `(when-not (exists? ~qualified)
625
+ (def ~x ~init ))))
623
626
624
627
(core/defn destructure [bindings]
625
628
(core/let [bents (partition 2 bindings)
Original file line number Diff line number Diff line change 1874
1874
(for [e s :when (and (sequential? e) (every? (fn [x] x) e))]
1875
1875
e))
1876
1876
[[]]))))
1877
+
1878
+ (deftest test-cljs-3333
1879
+ (defonce not-native 17 ) ; ; Intentionally matching a core name
1880
+ (is (== 17 not-native)))
You can’t perform that action at this time.
0 commit comments