Go version
gotip
Output of go env in your module/workspace:
What did you do?
package main
import (
"unsafe"
)
type F interface {
A() V
}
const size = unsafe.Sizeof(F(nil))
type V struct {
_ [size]int
}
func main() {
_ = V{}
}
https://go.dev/play/p/PTaVuR0dIyw?v=gotip
What did you see happen?
./prog.go:8:6: invalid recursive type F
./prog.go:8:6: F refers to V
./prog.go:14:6: V refers to size
./prog.go:12:7: size refers to F
What did you expect to see?
compile pass
This issue does not exist on go1.25.
cc @griesemer @mrkfrmn
Go version
gotip
Output of
go envin your module/workspace:.What did you do?
https://go.dev/play/p/PTaVuR0dIyw?v=gotip
What did you see happen?
What did you expect to see?
compile pass
This issue does not exist on go1.25.
cc @griesemer @mrkfrmn