]> Cypherpunks repositories - gostls13.git/commit
go/types: delay expansion of underlying in typeDecl
authorRobert Findley <rfindley@google.com>
Sun, 17 Oct 2021 22:27:53 +0000 (18:27 -0400)
committerRobert Findley <rfindley@google.com>
Mon, 18 Oct 2021 22:56:07 +0000 (22:56 +0000)
commiteba0e866fafe3f8223d654a29fb953e02c07364a
treedae71d7d8ac104de718f7c6d0fc1a9962e8dae62
parent323e009c757229bdf58f68fde1c5bf07e9e65b61
go/types: delay expansion of underlying in typeDecl

Even after type-checking the RHS of a type declaration, we may not yet
be able to expand, if the RHS is itself an instance (see #49043).

We can instead rely on the mechanisms we have in place for delayed
expansion.

Fixes #49043

Change-Id: Ibffa4c1b1163c824b5c7e151aaac35f3e8c84ec7
Reviewed-on: https://go-review.googlesource.com/c/go/+/356533
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/decl.go
src/go/types/named.go
src/go/types/testdata/check/typeinst.go2
src/go/types/testdata/fixedbugs/issue49043.go2 [new file with mode: 0644]