mirror of
https://github.com/golang/go
synced 2024-11-22 00:24:41 -07:00
Bug in go/parser when coverting identifier lists.
Fixes #567. R=rsc CC=golang-dev https://golang.org/cl/195041
This commit is contained in:
parent
7abb4b3a96
commit
70b92ddad3
@ -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",
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user