Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

implementations: "this function is not a method" error could just simply be "no results" #307

Open
@emidoots

Description

@emidoots

If you find implementations on a function rather than a method, you get an error:

Error getting implementations: This function is not a method

e.g. https://sourcegraph.com/github.com/sourcegraph/go-langserver/-/blob/langserver/implementation.go#L65:6&tab=impl

Of course, finding implementations on a function doesn't make sense. It only works on interface types and methods (finding the interfaces that implement that method).

We could make this error less confusing by e.g. just returning no error and simply returning no results.

The error originates from here: https://sourcegraph.com/github.com/sourcegraph/go-langserver@bf90fac03a4d1a07f50701547d56fabfdb0c32ec/-/blob/langserver/implementation.go#L76:30

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions