Skip to content

cmd/compile: a little inconsistency on uses of type parameters in type parameter lists #51499

@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 C1[T []T] struct{} // okay
type C2[T *T] struct{}  // error: undefined: T

What did you expect to see?

Both compiles.

What did you see instead?

The second one doesn't compile.

Not sure if this is intended, just feel they should be consistent.

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