go: x/tools/gopls: crash upon creating empty linked list

Here’s a hard one for you.

What version of Gopls are you using ?

$ gopls  version
golang.org/x/tools/gopls v0.6.9
    golang.org/x/tools/gopls@v0.6.9 h1:LBBcE2y3Tb4bp79JVLWCQBbvYCFEs5ADGWsQDoSLk1Q=

What did you do?

Create new program from scratch, write:

type a *a
var x a = a{}

or

type a *a
var x a = x

What did you expect to see?

gopls ask me why I would want to use this crazy datastructure

What did you see instead?

gopls crashes

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I don’t think this fix is sufficient for cyclic types like:

type (
	foo *bar
	bar *foo
)