]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/syntax: remove code dealing with multiple method names
authorRobert Griesemer <gri@golang.org>
Wed, 30 Mar 2022 02:38:00 +0000 (19:38 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 30 Mar 2022 18:02:38 +0000 (18:02 +0000)
commita7e76b8e809ccbd1ceef207a83f8303edb707867
treee3a86ac7ab009d0cdcecec1e0e630f623f368aa1
parentbf408e741c2827a45c8576dda4126fc4135ef247
cmd/compile/internal/syntax: remove code dealing with multiple method names

When parsing method declarations in an interface, the parser has
for historic reasons gracefully handled a list of method names with
a single (common) signature, and then reported an error. For example

        interface {
                m1, m2, m3 (x int)
        }

This code originally came from the very first parser for Go which
initially permitted such declarations (or at least assumed that
people would write such declarations). Nobody is doing this at this
point, so there's no need for being extra careful here. Remove the
respective code and adjust the corresponding test.

Change-Id: If6f9b398bbc9e425dcd4328a80d8bf77c37fe8b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/396654
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/syntax/parser.go
test/fixedbugs/bug121.go