]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use "satisfies" (not "implements") for constraint errors
authorRobert Griesemer <gri@golang.org>
Wed, 4 Jan 2023 00:01:49 +0000 (16:01 -0800)
committerRobert Griesemer <gri@google.com>
Wed, 4 Jan 2023 19:07:27 +0000 (19:07 +0000)
commit46e3d9d12a51e6783ac8a244f13a9a96abfef85e
tree1d4800da3a00c6bf1987d1343ebaf69eaa0d91b5
parent79cdecc8522e37d2eac5592c12459cd95ff92171
cmd/compile: use "satisfies" (not "implements") for constraint errors

Per the latest spec, we distinguish between interface implementation
and constraint satisfaction. Use the verb "satisfy" when reporting
an error about failing constraint satisfaction.

This CL only changes error messages. It has no impact on correct code.

Fixes #57564.

Change-Id: I6dfb3b2093c2e04fe5566628315fb5f6bd709f17
Reviewed-on: https://go-review.googlesource.com/c/go/+/460396
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
24 files changed:
src/cmd/compile/internal/types2/instantiate.go
src/go/types/instantiate.go
src/internal/types/testdata/check/issues1.go
src/internal/types/testdata/check/typeinst1.go
src/internal/types/testdata/examples/inference.go
src/internal/types/testdata/fixedbugs/issue39754.go
src/internal/types/testdata/fixedbugs/issue40350.go
src/internal/types/testdata/fixedbugs/issue45920.go
src/internal/types/testdata/fixedbugs/issue47411.go
src/internal/types/testdata/fixedbugs/issue49112.go
src/internal/types/testdata/fixedbugs/issue49179.go
src/internal/types/testdata/fixedbugs/issue49739.go
src/internal/types/testdata/fixedbugs/issue50417.go
src/internal/types/testdata/fixedbugs/issue50646.go
src/internal/types/testdata/fixedbugs/issue50782.go
src/internal/types/testdata/fixedbugs/issue51257.go
src/internal/types/testdata/fixedbugs/issue51376.go
src/internal/types/testdata/fixedbugs/issue51472.go
src/internal/types/testdata/fixedbugs/issue57486.go
src/internal/types/testdata/spec/comparable.go
src/internal/types/testdata/spec/comparable1.19.go
src/internal/types/testdata/spec/oldcomparable.go
test/typeparam/mdempsky/8.dir/b.go
test/typeparam/mincheck.dir/main.go