diff --git a/src/cmd/compile/internal/syntax/parser.go b/src/cmd/compile/internal/syntax/parser.go index d01ad6056e..0a872e03ef 100644 --- a/src/cmd/compile/internal/syntax/parser.go +++ b/src/cmd/compile/internal/syntax/parser.go @@ -1036,7 +1036,7 @@ func (p *parser) type_() Expr { if typ == nil { typ = p.bad() p.syntax_error("expecting type") - p.advance() + p.advance(_Comma, _Colon, _Semi, _Rparen, _Rbrack, _Rbrace) } return typ