Skip to content

go/types, types2: panic with invalid cyclic program involving unsafe.Sizeof #75918

@griesemer

Description

@griesemer

This program panics when type checking (playground):

type A [unsafe.Sizeof(S{})]byte

type S struct {
	a A
}

The program is invalid but the type checker/compiler should report an error.

Metadata

Metadata

Labels

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

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions