]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: consolidate testdata/examples test files
authorRobert Griesemer <gri@golang.org>
Thu, 18 Aug 2022 01:09:55 +0000 (18:09 -0700)
committerRobert Griesemer <gri@google.com>
Thu, 18 Aug 2022 21:54:10 +0000 (21:54 +0000)
commit9ad772033f04ea9b3082440d306e17802a08b4b4
tree819869eed3a0a48d127c28790e32e3c280eb1df3
parent9485d4c1bd871be792d03c29b7902f6ac284ed27
go/types, types2: consolidate testdata/examples test files

Besides applying gofmt (which doesn't damage the tests in this case),
the ERROR comments in the types2 files now match the go/types files.
But because types2 still reports some errors are different positions,
the checking code now allows for some position discrepancy (similar
to what we do for other tests).

Except for an outstanding TODO in go/types/testdata/examples/types.go
the test files are now identical.

For #54511.

Change-Id: I5748e0f678d11c5c0bdf4fdf28bd04f0b11b5b23
Reviewed-on: https://go-review.googlesource.com/c/go/+/424674
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/check_test.go
src/cmd/compile/internal/types2/testdata/examples/functions.go
src/cmd/compile/internal/types2/testdata/examples/inference.go
src/cmd/compile/internal/types2/testdata/examples/types.go
src/cmd/compile/internal/types2/testdata/examples/typesets.go
src/go/types/testdata/examples/functions.go
src/go/types/testdata/examples/inference.go
src/go/types/testdata/examples/types.go
src/go/types/testdata/examples/typesets.go