Commit 9f928f93 authored by Rob Findley's avatar Rob Findley Committed by Robert Findley
Browse files

[dev.typeparams] go/types, types2: set tset when constructing interfaces in the universe

As of CL 334894, type sets are lazily evaluated on interfaces. For the
universe interfaces error and comparable, this can lead to data races
when type checking concurrently. Fix this by computing their type set
when they are defined.

Tested using the repro from #47345. I considered checking this in as a
test, but it probably wouldn't add much value going forward.

Fixes #47345

Change-Id: I014a511b8e3c092c86201a8bfc7f5f494f8f20e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/336910


Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
parent 6992dcda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment