]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: avoid errors due to missing methods for invalid types
authorRobert Griesemer <gri@golang.org>
Mon, 11 Nov 2024 21:40:45 +0000 (13:40 -0800)
committerGopher Robot <gobot@golang.org>
Wed, 13 Nov 2024 19:41:32 +0000 (19:41 +0000)
commit66b6b174b6d320ff2044835504ecb152a914534f
tree1bf548be5bc4e5ff68b9e976f378532559ddee83
parent83a7626687c790b3770592794ba12e06fbc87a35
go/types, types2: avoid errors due to missing methods for invalid types

Don't report a (follow-on) error if a method is not found in a type
due to a prior error that made the type invalid, or which caused an
embedded field of a struct to have an invalid type (and thus one
cannot with certainty claim that a method is missing).

Fixes #53535.

Change-Id: Ib2879c6b3b9d927c93bbbf1d355397dd19f336f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/626997
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Tim King <taking@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/infer.go
src/cmd/compile/internal/types2/instantiate.go
src/cmd/compile/internal/types2/lookup.go
src/go/types/infer.go
src/go/types/instantiate.go
src/go/types/lookup.go
src/internal/types/testdata/fixedbugs/issue53535.go [new file with mode: 0644]