Skip to content

go/types, types2: alias types are restricted to basic interfaces, should allow arbitrary interfaces #51616

@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 C[T any] interface{~int; M() T}
type C1 = C[bool] // error
type C2 = comparable // error
type C3 = interface {~[]byte | ~string} // error

I didn't find this is documented in tip spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions