Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/parser: allow trailing commas in embedded instantiated types
go/parser can correctly parse interfaces that instantiate and embed generic interfaces, but not structs. This is because in the case of structs, it does not expect RBRACK as a token trailing COMMA in the type argument, even though it is allowed by the spec. For example, go/parser produces an error for the type declaration below: type A struct { B[byte, []byte,] } Fixes #56748 Change-Id: Ibb2addd6cf9b381d8470a6d20eedb93f13f93cd6 Reviewed-on: https://go-review.googlesource.com/c/go/+/450175 Run-TryBot: Robert Griesemer <[email protected]> Reviewed-by: Robert Findley <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Robert Griesemer <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
- Loading branch information