diff options
| author | Robert Findley <rfindley@google.com> | 2021-09-08 09:58:44 -0400 |
|---|---|---|
| committer | Robert Findley <rfindley@google.com> | 2021-09-08 17:35:45 +0000 |
| commit | c8d4fe2adc556317f75c2ebad195568ad5ff9644 (patch) | |
| tree | d19e79f1c21c88abc757d951a640b259df89b59c /src/testing/testing.go | |
| parent | d419f9c6124557e0bf08e00d7848e3e518ac4cbd (diff) | |
| download | go-c8d4fe2adc556317f75c2ebad195568ad5ff9644.tar.xz | |
go/types: temporarily pin the Checker to Interface during checking
While type checking expressions involving interface types, it is
possible that their type set is used before delayed actions are
processed. As a result, computeInterfaceTypeSet is called with a nil
checker, and errors in the interface type definition result in panics
(see #48234).
To avoid the panics, store a *Checker on Interface for use in between
checking of the interface type expression and processing of delayed
actions.
Fixes #48234
Change-Id: I5509bc1c01b55edac52446b9e075fbe8fcc01874
Reviewed-on: https://go-review.googlesource.com/c/go/+/348371
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/testing/testing.go')
0 files changed, 0 insertions, 0 deletions
