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/cmd/guru: GoDef returns incorrect definition for embedded fields in different files within the same package #16263

Closed
marcosnils opened this issue Jul 5, 2016 · 1 comment

Comments

@marcosnils
Copy link

marcosnils commented Jul 5, 2016

main.go

package main

type Fruta struct {
    Template
}

func main() {
}

lala.go

package main

type Template struct {
    Lala string
}
marcos@XPS:~/Projects/gopath/src/github.com/marcosnils/gotest$ guru definition /home/marcos/Projects/gopath/src/github.com/marcosnils/gotest/main.go:#35
/home/marcos/Projects/gopath/src/github.com/marcosnils/gotest/main.go:4:2: defined here as field Template Template

Should have reported lala.go Template struct definition.

This works if embedded fields are in the same file or different package.

@quentinmit quentinmit added this to the Unreleased milestone Jul 29, 2016
@gopherbot
Copy link

CL https://golang.org/cl/27001 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants