Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: duplicate method implementations with embedded type #35600

Closed
muirdm opened this issue Nov 14, 2019 · 2 comments
Closed

x/tools/gopls: duplicate method implementations with embedded type #35600

muirdm opened this issue Nov 14, 2019 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@muirdm
Copy link

muirdm commented Nov 14, 2019

With something like this:

type foo struct {
  time.Time
}

type unixer interface {
  Unix() int64
}

If you find implementations on the Unix() interface method, you get back duplicate results for time.Time.Unix().

Below is a sample response showing the duplicates:

[Trace - 03:45:53 PM] Received response 'textDocument/implementation - (127)' in 4ms.
Result: [
  {
    "range": {
      "end": {
        "character": 18,
        "line": 1150
      },
      "start": {
        "character": 14,
        "line": 1150
      }
    },
    "uri": "file:///usr/local/go/src/time/time.go"
  },
  {
    "range": {
      "end": {
        "character": 18,
        "line": 1150
      },
      "start": {
        "character": 14,
        "line": 1150
      }
    },
    "uri": "file:///usr/local/go/src/time/time.go"
  },
  {
    "range": {
      "end": {
        "character": 18,
        "line": 1150
      },
      "start": {
        "character": 14,
        "line": 1150
      }
    },
    "uri": "file:///usr/local/go/src/time/time.go"
  }
]
@gopherbot gopherbot added this to the Unreleased milestone Nov 14, 2019
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Nov 14, 2019
@gopherbot
Copy link

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@ridersofrohan
Copy link

Fixed in #af85770

@golang golang locked and limited conversation to collaborators Nov 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants