Commit 70b92dda authored by Robert Griesemer's avatar Robert Griesemer

Bug in go/parser when coverting identifier lists.

Fixes #567.

R=rsc
CC=golang-dev
https://golang.org/cl/195041
parent 7abb4b3a
......@@ -464,7 +464,7 @@ func (p *parser) makeIdentList(list *vector.Vector) []*ast.Ident {
if !isIdent {
pos := x.(ast.Expr).Pos()
p.errorExpected(pos, "identifier")
idents[i] = &ast.Ident{pos, ast.NewObj(ast.Err, pos, "")}
ident = &ast.Ident{pos, ast.NewObj(ast.Err, pos, "_")}
}
idents[i] = ident
}
......
......@@ -34,6 +34,7 @@ var validPrograms = []interface{}{
`package main; func main() { if f(T{}) {} }` + "\n",
`package main; func main() { _ = (<-chan int)(x) }` + "\n",
`package main; func main() { _ = (<-chan <-chan int)(x) }` + "\n",
`package main; func f(func() (func() int))` + "\n",
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment