]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/syntax: fix parsing of array or slice constraint types
authorRobert Griesemer <gri@golang.org>
Sat, 30 Oct 2021 17:50:59 +0000 (10:50 -0700)
committerRobert Griesemer <gri@golang.org>
Sun, 31 Oct 2021 02:24:29 +0000 (02:24 +0000)
commit0bef30d28ac0b9654e5daef0fef731d7a9495214
treeabf5ccd909508aee315df0884d758487e659b50a
parent6113dacf32db7a996bc53fa7ca0db314cd3e7378
cmd/compile/internal/syntax: fix parsing of array or slice constraint types

This is a port of the idea used in CL 359134 from go/parser to syntax,
with adjustments due to the slightly different structure of the two
parsers, and some refactoring to simplify the logic.

Fixes #49175.

Change-Id: Ib4955bde708f2b08345f35523e6094c03ab3076c
Reviewed-on: https://go-review.googlesource.com/c/go/+/360135
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/syntax/parser.go
src/cmd/compile/internal/syntax/testdata/typeset.go2