Closed
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
1.11, darwin/amd64
What did you do?
https://play.golang.org/p/WNDetHOIGt3
$ cat x.go
package tmp
type Q interface {
Foo()
Bar()
Baz()
}
type B interface {
B() Q
}
type O interface {
O() interface {
O
B
Q
}
}
type W interface {
W() interface {
O
B
Q
}
}
type S interface {
S() interface {
S
W
Q
}
}
# _/tmp
<autogenerated>:1: internal compiler error: name too long: *interface { Bar(); Baz(); Foo(); S() interface { Bar(); Baz(); Foo(); S() interface { Bar(); Baz();
[ ... ]
Baz(); Foo(); O() interface { B() tmp.Q; Bar(); Baz(); Foo(); O() interface { B() tmp.Q; Bar(); Baz(); Foo(); O() interface { B<...>; Bar<...>; Baz<...>; Foo<...>; O<...> } } } } } } } }
[ ... ]
Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
If you remove S
, it compiles just fine.
Related, if only tangentially, to #26863.