Skip to content

go/parser: parses comma terminated fields #11611

Closed
@dvyukov

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions