-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.early-in-cycleA change that should be done early in the 3 month dev cycle.A change that should be done early in the 3 month dev cycle.
Milestone
Description
Given:
package p
type s struct { i i }
type i interface { s | any }
go/types currently reports:
/tmp/y.go:3:6: invalid recursive type s
/tmp/y.go:3:6: s refers to
/tmp/y.go:4:6: i refers to
/tmp/y.go:3:6: s
Notably, changing the field type from i to *i makes the error go away. I don't see any fundamental reason why that should make a difference though.
Synthetic test case, constructed while trying to write additional test cases for #60117.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.early-in-cycleA change that should be done early in the 3 month dev cycle.A change that should be done early in the 3 month dev cycle.