Skip to content

go/types, types2: unsafe.Sizeof panics with expr of value type #76478

@mrkfrmn

Description

@mrkfrmn

The problem below is that during the checking of A, f is an expression that returns a B, which is not an A, but contains an A.

type A [unsafe.Sizeof(f())]int

func f() B {
	return B{}
}

type B struct {
	f A
}

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.NeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions