code: public static void redefineProperty(Scriptable obj, String name,
                                          boolean isConst)
      {
          Scriptable base = getBase(obj, name);
          if (base == null)
              return;
          if (base instanceof ConstProperties) {
              ConstProperties cp = (ConstProperties)base;
  
              if (cp.isConst(name))
                  throw ScriptRuntime.typeError1("msg.const.redecl", name);
          }
          if (isConst)
              throw ScriptRuntime.typeError1("msg.var.redecl", name);
      }
docs: If hasProperty(obj, name) would return true, then if the property that
  was found is compatible with the new property, this method just returns.
  If the property is not compatible, then an exception is thrown.
  
  A property redefinition is incompatible if the first definition was a
  const declaration or if this one is.  They are compatible only if neither
  was const.