    # File lib/yard/registry.rb, line 267
          def resolve(namespace, name, inheritance = false, proxy_fallback = false)
            if namespace.is_a?(CodeObjects::Proxy)
              return proxy_fallback ? CodeObjects::Proxy.new(namespace, name) : nil
            end

            if namespace == :root || !namespace
              namespace = root
            else
              namespace = namespace.parent until namespace.is_a?(CodeObjects::NamespaceObject)
            end
            orignamespace = namespace

            name = name.to_s
            if name =~ /^#{CodeObjects::NSEPQ}/
              [name, name[2..-1]].each do |n|
                return at(n) if at(n)
              end
            else
              while namespace
                if namespace.is_a?(CodeObjects::NamespaceObject)
                  nss = inheritance ? namespace.inheritance_tree(true) : [namespace]
                  nss.each do |ns|
                    next if ns.is_a?(CodeObjects::Proxy)
                    found = partial_resolve(ns, name)
                    return found if found
                  end
                end
                namespace = namespace.parent
              end
            end
            proxy_fallback ? CodeObjects::Proxy.new(orignamespace, name) : nil
          end