• Robert Griesemer's avatar
    go/types: don't over-eagerly verify embedded interfaces · fd4392ba
    Robert Griesemer authored
    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: 's avatarAlan Donovan <adonovan@google.com>
    fd4392ba
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...