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
{{ message }}
Repository navigation
cmd/compile: "invalid recursive type" should abort #28294
This seems to be similar to #21273 (fixed in Go 1.10).
▶ go version
go version go1.11 darwin/amd64
package main
funcmain() {
typeintinttypeIintconstiI=1
}
The above fails with
./main.go:4:7: invalid recursive type int
./main.go:5:7: invalid recursive type I
./main.go:7:8: invalid constant type I
The above is clear enough in this small case, but I had this happen to me (again, an automatic refactoring gone wrong) in a bigger program and all I saw was a list of invalid constant type (that looked valid), and then too many errors.
Activity
meirf commentedon Oct 20, 2018
Maybe this case should follow the same logic as here:
This case is trickier though since I is
typed of the original error type.cc @griesemer
griesemer commentedon Mar 18, 2022
This is now (Go 1.18) reporting:
which seems reasonable. Closing as working as expected.