Gopher Robot submitted the change![Open in Gerrit]()
Change information
Commit message:
go/types,cmd/compile/internal/types2: better diagnostic for type shadowing
This change causes the "x is not a type" diagnostic to describe
x's actual kind, helping to reveal when shadowing is at work.
(The kind description could improve other errors too.)
Fixes #76877
Change-Id: Ia3484998bb384ff570c20b6792cf8461c60aa38c
Files:
- M src/cmd/compile/internal/types2/object.go
- M src/cmd/compile/internal/types2/typexpr.go
- M src/go/types/object.go
- M src/go/types/typexpr.go
- M src/internal/types/testdata/check/cycles5.go
- M src/internal/types/testdata/check/cycles5a.go
- M src/internal/types/testdata/check/decls1.go
- M src/internal/types/testdata/check/issues0.go
- M src/internal/types/testdata/check/issues1.go
- M src/internal/types/testdata/fixedbugs/issue39634.go
- M src/internal/types/testdata/fixedbugs/issue65344.go
- M test/fixedbugs/issue4610.go
Change size: M
Delta: 12 files changed, 117 insertions(+), 11 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Robert Griesemer
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ia3484998bb384ff570c20b6792cf8461c60aa38c
Gerrit-Change-Number: 731180
Gerrit-PatchSet: 9