mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/gc: handle recursive interfaces better
Previously, we handled recursive interfaces by deferring typechecking of interface methods, while eagerly expanding interface embeddings. This CL switches to eagerly evaluating interface methods, and deferring expanding interface embeddings to dowidth. This allows us to detect recursive interface embeddings with the same mechanism used for detecting recursive struct embeddings. Updates #16369. Change-Id: If4c0320058047f8a2d9b52b9a79de47eb9887f95 Reviewed-on: https://go-review.googlesource.com/38391 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
4e35e5fcab
commit
07de3465be
9 changed files with 99 additions and 90 deletions
|
|
@ -642,7 +642,6 @@ var etnames = []string{
|
|||
TBLANK: "TBLANK",
|
||||
TFUNCARGS: "TFUNCARGS",
|
||||
TCHANARGS: "TCHANARGS",
|
||||
TINTERMETH: "TINTERMETH",
|
||||
TDDDFIELD: "TDDDFIELD",
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue