]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: export data result types are always parenthesized
authorRobert Griesemer <gri@golang.org>
Thu, 21 Feb 2013 01:37:13 +0000 (17:37 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 21 Feb 2013 01:37:13 +0000 (17:37 -0800)
Minor simplification of gcimporter, removed TODO.

R=adonovan
CC=golang-dev
https://golang.org/cl/7363044

src/pkg/go/types/gcimporter.go

index 614ad2e179386dfa5f616de71b58d4595225ad70..d795f41d99a794232bd1eb772a207efbe67fd221 100644 (file)
@@ -548,13 +548,7 @@ func (p *gcParser) parseSignature() *Signature {
 
        // optional result type
        var results []*Var
-       switch p.tok {
-       case scanner.Ident, '[', '*', '<', '@':
-               // TODO(gri) does this ever happen?
-               // single, unnamed result
-               results = []*Var{{Type: p.parseType()}}
-       case '(':
-               // named or multiple result(s)
+       if p.tok == '(' {
                var variadic bool
                results, variadic = p.parseParameters()
                if variadic {