(Symbol sym, Object old, Object neu)
| 104 | | alias mapping | name -> other/whatever | warn + replace | warn + replace | |
| 105 | */ |
| 106 | private boolean checkReplacement(Symbol sym, Object old, Object neu){ |
| 107 | if(old instanceof Var) { |
| 108 | Namespace ons = ((Var)old).ns; |
| 109 | Namespace nns = neu instanceof Var ? ((Var) neu).ns : null; |
| 110 | |
| 111 | if(isInternedMapping(sym, old)){ |
| 112 | if(nns != RT.CLOJURE_NS){ |
| 113 | RT.errPrintWriter().println("REJECTED: attempt to replace interned var " |
| 114 | + old + " with " + neu + " in " + name + ", you must ns-unmap first"); |
| 115 | return false; |
| 116 | } |
| 117 | else |
| 118 | return false; |
| 119 | } |
| 120 | } |
| 121 | RT.errPrintWriter().println("WARNING: " + sym + " already refers to: " + old + " in namespace: " + name |
| 122 | + ", being replaced by: " + neu); |
| 123 | return true; |
| 124 | } |
| 125 | |
| 126 | Object reference(Symbol sym, Object val){ |
| 127 | if(sym.ns != null) |
no test coverage detected