You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"unsafe"
)
typeAstruct {
SomeIntintPtr*BSomeBoolbool
}
typeBstruct {
A_ [64-unsafe.Sizeof(A{})]byte// pad to cache lineOtherFieldsintWhateverstring
}
funcmain() {}
What did you expect to see?
A successful compilation (as it does on go1.17).
What did you see instead?
./prog.go:15:34: invalid recursive type
The text was updated successfully, but these errors were encountered:
bcmills
changed the title
cmd/go: valid go1.17 non-recursive program fails to compile with invalid recursive type error
cmd/compile: valid go1.17 non-recursive program fails to compile with invalid recursive type error
Apr 4, 2023
What version of Go are you using (
go version
)?go1.18+
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux/amd64 but presumably this is not architecture/os specific.
What did you do?
tried to compile this program: https://go.dev/play/p/9p5orAisxIh
What did you expect to see?
A successful compilation (as it does on go1.17).
What did you see instead?
./prog.go:15:34: invalid recursive type
The text was updated successfully, but these errors were encountered: