Skip to content

Commit 2417749

Browse files
bronsastuarthalloway
authored andcommitted
CLJ-1578 don't throw when a core Var replaces another Var to avoid breaking ns reloading
Signed-off-by: Stuart Halloway <stu@cognitect.com>
1 parent ebda7ff commit 2417749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jvm/clojure/lang/Namespace.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private void warnOrFailOnReplace(Symbol sym, Object o, Object v){
8282
if (o instanceof Var)
8383
{
8484
Namespace ns = ((Var)o).ns;
85-
if (ns == this)
85+
if (ns == this || (v instanceof Var && ((Var)v).ns == RT.CLOJURE_NS))
8686
return;
8787
if (ns != RT.CLOJURE_NS)
8888
throw new IllegalStateException(sym + " already refers to: " + o + " in namespace: " + name);

0 commit comments

Comments
 (0)