Skip to content

cmd/compile: misleading error message when using type parameter in typeset #50420

@icholy

Description

@icholy

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

devel go1.18-c8861432b8 Sun Jan 2 14:27:43 2022 +0000

What did you do?

type X[T any] interface {
	T | string
}

https://go.dev/play/p/v-8zaOs_d3r?v=gotip

What did you expect to see?

"cannot use type parameter in typeset"

What did you see instead?

"cannot embed a type parameter"

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions