go/types: don't over-eagerly verify embedded interfaces
In https://go-review.googlesource.com/c/go/+/114317 (fix for #25301) the constructor types.NewInterface was replaced with NewInterface2. The new constructor aggressively verified that embedded interfaces had an underlying type of interface type; the old code didn't do any verification. During importing, defined types may be not yet fully set up, and testing their underlying types will fail in those cases. This change only verifies embedded types that are not defined types and thus restores behavior for defined types to how it was before the fix for #25301. Fixes #25596. Fixes #25615. Change-Id: Ifd694413656ec0b780fe4f37acaa9e6ba6077271 Reviewed-on: https://go-review.googlesource.com/115155 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
Showing
Please
register
or
sign in
to comment