]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: better error messages for invalid calls
authorRobert Griesemer <gri@golang.org>
Tue, 4 Mar 2025 02:06:48 +0000 (18:06 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 6 Mar 2025 21:35:49 +0000 (13:35 -0800)
commit584e631023e1edd49862c20a952608a5518a810e
tree4467f97d84247fc305a47dbe906146fb870932d6
parent8b7e376e71cbd23a0644ff50cc4e75ce47cd9723
go/types, types2: better error messages for invalid calls

Rather than reporting "non-function" for an invalid type parameter,
report which type in the type parameter's type set is not a function.

Change-Id: I8beec25cc337bae8e03d23e62d97aa82db46bab4
Reviewed-on: https://go-review.googlesource.com/c/go/+/654475
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/types2/call.go
src/go/types/call.go
src/internal/types/testdata/check/lookup1.go
src/internal/types/testdata/fixedbugs/issue49482.go
test/fixedbugs/issue17038.go
test/fixedbugs/issue22822.go
test/fixedbugs/issue27356.go