Skip to content

cmd/compile: syntax error for valid type parameter list #51488

@zigo101

Description

@zigo101

What version of Go are you using (go version)?

$ go version
go version go1.18rc1 linux/amd64

What did you do?

type foo[T *string,] struct{x T}      // okay
type bar[T *string|bool,] struct{x T} // syntax error: unexpected comma; expecting ]
type tik[T *string|bool, X int] struct{x T} // syntax error: unexpected comma; expecting ]

What did you expect to see?

compiles okay

What did you see instead?

fails to compile

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions