#!stacks
"go/types.(*Package).Path:=34" && "gcimporter.(*exportWriter).exportPath:=688"

Issue created by stacks.

If you walk all the way up the stack, you get to this line, which writes the value of a constant. It passes pkg=nil (meaning "the current package"), yet somehow the nil pkg is plumbed all the way down to exportPath, which assumes it is non-nil.

func (w *exportWriter) value(typ types.Type, v constant.Value) {
    w.typ(typ, nil)

This stack 0BaS9w was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.23.8 darwin/arm64 other,vscode (25)

Comment From: gabyhelp

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: adonovan

This stack ChWbnw was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.24.2 darwin/arm64 vscode (1)

This stack wY83jw was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.24.0 darwin/arm64 neovim,vscode (5)

This stack v95MAw was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.23.6 linux/amd64 vscode (1)

This stack 9iXGhQ was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.24.1 darwin/arm64 vscode (2)

This stack PrtfKQ was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.23.6 windows/amd64 vscode (1)
golang.org/x/tools/gopls@v0.18.1 go1.23.6 linux/amd64 vscode (1)

This stack r1YMdg was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.23.6 windows/amd64 vscode (1)

This stack Cys7zA was reported by telemetry:

golang.org/x/tools/gopls@v0.18.1 go1.24.0 linux/amd64 neovim (1)