Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

go/types, types2: missed error for structs referencing invalid types #75194

Open
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation. compiler/runtimeIssues related to the Go compiler and/or runtime.
@mrkfrmn

Description

The below only reports a layout cycle for A — it misses the layout cycle for B.

type A struct {
	a A
}
type B struct {
	a A
	b B
}

Fairly confident this is a problem with validType, which is probably short circuiting on the invalid for A in B. This is already patched locally for me, but we seem to rely on this bug for a test in x/tools.

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation. compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /