The type checkers should report the most recent (or closest) source line number for assertion failures. See https://github.com/golang/go/issues/67872#issuecomment-2155783254. Tracking issue.

Comment From: gabyhelp

Similar Issues

  • https://github.com/golang/go/issues/51603

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

Comment From: rsc

Looks like #51603 and this issue are the same issue?

Comment From: griesemer

@rsc. Indeed. Closing this as duplicate of https://github.com/golang/go/issues/51603.