Skip to content

cmd/compile: valid type using type aliases reported as invalid #18640

Closed
@griesemer

Description

@griesemer

In Go1.9, with type alias support (currently on dev.typealias branch):

type (
	a = b
	b struct {
		*a
	}
)

produces:

x.go:19: invalid recursive type alias a
	x.go:19: a uses b
	x.go:20: b uses <T>
	x.go:22: <T> uses a

There are a couple of issues:

  • we'd like to have the struct be represented more sensibly (rather than just <T>)
  • the code is actually correct

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone 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