]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: don't update the underlying type of an imported type
authorRobert Griesemer <gri@golang.org>
Thu, 17 Oct 2019 23:28:38 +0000 (16:28 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 18 Oct 2019 02:47:24 +0000 (02:47 +0000)
commit8d2ea2936b337f6276054dd4ac40999dd0f22dbc
treebaf9847ba848fd55b83d05074f19edbb28d359ea
parent8c6876e9a481a2ea48070d3285a07163f564877b
go/types: don't update the underlying type of an imported type

Updating the underlying type of an imported type (even though
is was set to the same type again) leads to a race condition
if the imported package is imported by separate, concurrently
type-checked packages.

Fixes #31749.

Change-Id: Iabb8e8593eb067eb4816c1df81e545ff52d32c6c
Reviewed-on: https://go-review.googlesource.com/c/go/+/201838
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/go/types/decl.go
src/go/types/issues_test.go