]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: add additional test data from types2
authorRob Findley <rfindley@google.com>
Thu, 29 Apr 2021 15:42:35 +0000 (11:42 -0400)
committerRobert Findley <rfindley@google.com>
Thu, 29 Apr 2021 16:31:18 +0000 (16:31 +0000)
commit5a8435d701c1c8c39f403942d4f6a0ac065635db
tree5505218a2a548cf71b6ffd531e6fed2197479a76
parentf7c6f6210be16d6ecfdece7c283fcd4ddc28b151
go/types: add additional test data from types2

Add some test data files that were not included in go/types.

- Issue 43125 only pertained to types2 because go/ast differentiates
  StarExpr, UnaryExpr, and BinaryExpr, so typexpr.go was already
  catching the invalid type expressions.
- Issues 42987 and 43190 are handled differently by go/parser.
- main.go2 was not added when ported to go/types, because this work
  happened on the dev.regabi branch, which didn't support generics.

Test files are modified to adjust errors messages and positions, and to
update the copyright year.

Change-Id: Ia737eaab9afb2b59600b661ccf3eec3cbbb2d66c
Reviewed-on: https://go-review.googlesource.com/c/go/+/315070
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/testdata/check/main.go2 [new file with mode: 0644]
src/go/types/testdata/fixedbugs/issue42987.src [new file with mode: 0644]
src/go/types/testdata/fixedbugs/issue43125.src [new file with mode: 0644]
src/go/types/testdata/fixedbugs/issue43190.src [new file with mode: 0644]