Skip to content

go/parser: parses comma terminated fields #11611

Closed
@dvyukov

Description

@dvyukov

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions