golang/go

go/parser: parses comma terminated fields

dvyukov opened this issue · 1 comments

gotype successfully parses (via go/parser) the following program:

package a
type T struct{int,}

while gc says:

go.go:2: syntax error: unexpected }, expecting name

As far as I see, gc is right. I don't see where spec allows commas there.

on commit af81789

CL https://golang.org/cl/14565 mentions this issue.