Commit c9e05fdc authored by Dan Scales's avatar Dan Scales
Browse files

cmd/compile: fix reference to generic type needed by crawler

This problem happens when you create a new local type that uses an
imported generic type (maybe just by instantiating it), and then that
local type needed to be included as part of an export. In that case, the
imported generic type is does not have a declaration in the local
package, so it is not necessarily created in types1, so the
crawler/export doesn't work.

To fix this issue, we just need to add a call to g.obj() for the base
generic type, to make sure that it will exist if needed later in the
compilation or for the crawler during export.

Fixes #47514

Change-Id: Ie756578f07ad0007de8a88ae909cf7534a22936e
Reviewed-on: https://go-review.googlesource.com/c/go/+/345411


Reviewed-by: default avatarKeith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
parent eb6a07fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment