]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: use "invalid operation: x rel y (cause)" for comparison error messages
authorRobert Griesemer <gri@golang.org>
Wed, 28 Sep 2022 03:07:30 +0000 (20:07 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 28 Sep 2022 10:36:02 +0000 (10:36 +0000)
commitdbe56ff6c7a0162f318ed2dd7331c9de82e11d6d
tree4a14d580e764744f2422f78408330b6f450b98b2
parent2c4c2a5106e16a2ef51e3fc1d846e5d75d7ee6cc
go/types, types2: use "invalid operation: x rel y (cause)" for comparison error messages

Matches compiler behavior and is consistent with what we do with other
binary operations.

While at it, also use parentheses rather than a colon for a couple of
errors caused by not having a core type.

For #55326.

Change-Id: I0a5cec1a31ffda98d363e5528791965a1ccb5842
Reviewed-on: https://go-review.googlesource.com/c/go/+/435618
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/expr.go
src/go/types/expr.go
src/internal/types/testdata/check/expr2.go
src/internal/types/testdata/check/typeparams.go
src/internal/types/testdata/fixedbugs/issue43671.go
src/internal/types/testdata/fixedbugs/issue51335.go
src/internal/types/testdata/fixedbugs/issue51472.go