aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/api
diff options
context:
space:
mode:
authorRobert Findley <rfindley@google.com>2021-10-08 16:28:35 -0400
committerRobert Findley <rfindley@google.com>2021-10-11 22:16:44 +0000
commit2ecdf9d800f631cfde30b7463a3ed2c0b60611d5 (patch)
treed3080f38b3fc2acecbc6d32cfaedaf58c3c309f4 /src/cmd/api
parentd973bb107e9142cf17e4a7f2666a71ed2d457e91 (diff)
downloadgo-2ecdf9d800f631cfde30b7463a3ed2c0b60611d5.tar.xz
go/parser: allow eliding interface in constraint literals
This is a port of CL 353133 from cmd/compile/internal/syntax, with significant adjustments for the mechanics of go/parser. Some additional cleanup is made along the way: parseParameterList can call parseParamDecl without indirection, and the tparams argument is redundant with the closing token. Also, the error that "all type parameters must be named" is positioned on the first unnamed type parameter. Error recovery in go/parser is notably worse here than the compiler parser, so the test data had to be adjusted to synchronize positions. Fixing this error recovery will have to wait for a later CL. As with the compiler changes, these changes are guarded behind a flag so that they may be easily removed if #48424 is not accepted. For #48424 Change-Id: If87925d246f36aaab11a95442f75f659462d4286 Reviewed-on: https://go-review.googlesource.com/c/go/+/354870 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>
Diffstat (limited to 'src/cmd/api')
0 files changed, 0 insertions, 0 deletions