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
Assignees
Labels
Milestone

Comments

@muirdm
Copy link

@muirdm 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 label Nov 14, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 14, 2019

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

This comment has been minimized.

Copy link

@ridersofrohan ridersofrohan commented Nov 26, 2019

Fixed in #af85770

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.