Skip to content

cmd/compile: seemingly valid generic interface rejected #68162

Open
@griesemer

Description

@griesemer

I don't see a good reason why the following interface should be invalid:

type Element[E Element[E]] interface {
	Less(E) bool
}

Yet the compiler reports an invalid recursive type.
See example application here.

Metadata

Metadata

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.early-in-cycleA change that should be done early in the 3 month dev cycle.

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions