    # File lib/yard/code_objects/class_object.rb, line 122
        def superclass=(object)
          case object
          when Base, Proxy, NilClass
            @superclass = object
          when String, Symbol
            @superclass = Proxy.new(namespace, object)
          else
            raise ArgumentError, "superclass must be CodeObject, Proxy, String or Symbol"
          end

          if name == @superclass.name && namespace != YARD::Registry.root && !object.is_a?(Base)
            @superclass = Proxy.new(namespace.namespace, object)
          end

          if @superclass == self
            msg = "superclass #{@superclass.inspect} cannot be the same as the declared class #{self.inspect}"
            @superclass = P("::Object")
            raise ArgumentError, msg
          end
        end