Go version

go1.24

Output of go env in your module/workspace:

n/a

What did you do?

I had a comment like:

// MarshalJSON marshals d as JSON in a non-reversible manner and
// primarily intended for logging purposes.
//
// In particular, it uses:
//   - [reflect.Type.String] to encode a Go type
//   - [error.Error] to encode a Go error
//   - [Difference.OptionNames] to encode a [jsonv2.Options]

What did you see happen?

The [reflect.Type.String] and [Difference.OptionNames] were correctly resolved. However, [error.Error] failed to be resolved.

What did you expect to see?

go/doc, gopls, etc. should recognize the linking of builtin types and methods.

Comment From: adonovan

The gopls "Hover" and "Definition" parts of this are https://github.com/golang/go/issues/64648, which was fixed recently; the gopls v0.20 prerelease tomorrow will contain the fix.

Gopls' "browse package documentation" feature doesn't yet support this though.