]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: instantiated interfaces must be concurrency safe
authorRob Findley <rfindley@google.com>
Tue, 25 Jul 2023 15:57:37 +0000 (11:57 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 1 Aug 2023 17:16:43 +0000 (17:16 +0000)
commitb6898dde3d7488cfa41b4f126f6fed49d2918ea5
tree0d4b3bb0543a36d95449fd7edacc5a69d81b69c9
parent8597d052b2467a9f9ea20673555d65f0149c4bb4
go/types, types2: instantiated interfaces must be concurrency safe

It is the responsibility of go/types to complete any interface it
creates, except for those created by the user using NewInterface.
However, this was not being done for interfaces created during
instantiation.

Fix this by (rather carefully) ensuring that all newly created
interfaces are eventually completed.

Fixes golang/go#61561

Change-Id: I3926e7c9cf80714838d2c1b5f36a2d3221c60c41
Reviewed-on: https://go-review.googlesource.com/c/go/+/513015
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/api_test.go
src/cmd/compile/internal/types2/interface.go
src/cmd/compile/internal/types2/named.go
src/cmd/compile/internal/types2/subst.go
src/go/types/api_test.go
src/go/types/interface.go
src/go/types/named.go
src/go/types/subst.go