]> Cypherpunks repositories - gostls13.git/commit
go/parser: disallow parenthesizing embedded types in structs
authorRobert Griesemer <gri@golang.org>
Thu, 18 Aug 2022 03:11:57 +0000 (20:11 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 19 Aug 2022 17:46:01 +0000 (17:46 +0000)
commit9b48ffa98af149408b8e4734676bcc2cf95278fd
tree9a9015d8ade49dc2c980f6d3c534a0aeb8904432
parent0a1da095d1cef7c8ac6065da2983565b450566a5
go/parser: disallow parenthesizing embedded types in structs

This was never permitted in Go but the flexibility to do so
was introduced through the generics prototype code where we
experimented with parentheses to enclose type parameters.
Restore original (pre-generics) behavior.

Fixes #51655.

Change-Id: Ia7a4b2e393e0214a70e840c8663cf4474c5c754b
Reviewed-on: https://go-review.googlesource.com/c/go/+/424694
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/go/parser/parser.go
src/go/parser/short_test.go