]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: use "unknown field f in struct literal of type S" in error messages
authorRobert Griesemer <gri@golang.org>
Mon, 26 Sep 2022 19:47:41 +0000 (12:47 -0700)
committerRobert Griesemer <gri@google.com>
Tue, 27 Sep 2022 21:59:09 +0000 (21:59 +0000)
commitb16501c08b37235a67e2fc5b506f169152db57ae
tree066e2f1c26034de79e0871e00838a77d02d1aa8e
parent3b5188ed2c38ba29aa586db7af243c3f3be27944
go/types, types2: use "unknown field f in struct literal of type S" in error messages

This is a compromise of the error reported by the compiler (quotes
around field name removed) and the error reported by the type checkers
(added mention of struct type).

For #55326.

Change-Id: Iac4fb5c717f17c6713e90d327d39e68d3be40074
Reviewed-on: https://go-review.googlesource.com/c/go/+/434815
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/expr.go
src/go/types/expr.go
test/fixedbugs/issue17631.go
test/fixedbugs/issue19482.go
test/fixedbugs/issue24339.go
test/fixedbugs/issue25727.go