diff options
| author | cia-rana <kiwamura0314@gmail.com> | 2022-11-14 17:01:03 +0900 |
|---|---|---|
| committer | Robert Griesemer <gri@google.com> | 2022-11-17 17:02:15 +0000 |
| commit | cafb49ac731f862f386862d64b27b8314eeb2909 (patch) | |
| tree | 4680d4377efb0099043236e4afd25e24e9108118 /src/path/filepath | |
| parent | f3ae7ac9d90a26e9bba1589ae934e62bf0ac17e0 (diff) | |
| download | go-cafb49ac731f862f386862d64b27b8314eeb2909.tar.xz | |
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 <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Diffstat (limited to 'src/path/filepath')
0 files changed, 0 insertions, 0 deletions
