]> Cypherpunks repositories - gostls13.git/commit
go/types: guard against check==nil in newNamed
authorRob Findley <rfindley@google.com>
Thu, 27 May 2021 16:35:01 +0000 (12:35 -0400)
committerRobert Findley <rfindley@google.com>
Thu, 27 May 2021 17:28:26 +0000 (17:28 +0000)
commit6b8c94b6c524710bc3290546176a0da2f7c8c9db
treed93ce81b25a74f9d5dc6cb1694074d581a8ed684
parentfca7b8f3e690ec0562dd6ed609a8c7e6bef744c8
go/types: guard against check==nil in newNamed

When importing generic named types, it is possible for Checker.newNamed
to be called during type instantiation when the Checker is nil.

In this case we should be able to safely skip this delayed expansion.

Updates #45580

Change-Id: I75422100464d57eba24642c93e06e8b47d904fc3
Reviewed-on: https://go-review.googlesource.com/c/go/+/322974
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>
src/go/types/type.go