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: "illegal line number"-panic in fillstruct #39855

Closed
leitzler opened this issue Jun 25, 2020 · 3 comments
Closed

x/tools/gopls: "illegal line number"-panic in fillstruct #39855

leitzler opened this issue Jun 25, 2020 · 3 comments

Comments

@leitzler
Copy link
Contributor

@leitzler leitzler commented Jun 25, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14.4 darwin/amd64
$ go list -m golang.org/x/tools golang.org/x/tools/gopls
golang.org/x/tools@v0.0.0-20200624163319-25775e59acb7
golang.org/x/tools/gopls@v0.0.0-20200624163319-25775e59acb7

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
n/a

What did you do?

Called the fillstruct code action on the following code trying to fill Foo:

package main

type Foo struct {
        a map[int]struct{}
        b map[int]*bool
}

func main() {
    _ = Foo{}
}

What did you expect to see?

No panic

What did you see instead?

Panic in the analyser: analysis fillstruct for package x panicked: illegal line number

//cc @joshbaum

@gopherbot gopherbot added this to the Unreleased milestone Jun 25, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jun 25, 2020

I think this should be fixed by https://golang.org/cl/239751. Are you still seeing it with that CL?

@danp
Copy link
Contributor

@danp danp commented Jun 25, 2020

I was having this issue as well with v0.4.2-pre1 and just confirmed that gopls at tools/tip (including 239751) is no longer erroring on fillstruct where v0.4.2-pre1 was. Thanks!

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jun 25, 2020

Perfect, thanks for following up! Closing.

@stamblerre stamblerre closed this Jun 25, 2020
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.