We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dfd458 commit 7520c08Copy full SHA for 7520c08
src/cmd/compile/internal/types2/named.go
@@ -113,6 +113,9 @@ func (t *Named) SetUnderlying(underlying Type) {
113
panic("underlying type must not be *Named")
114
}
115
t.resolve(nil).underlying = underlying
116
+ if t.fromRHS == nil {
117
+ t.fromRHS = underlying // for cycle detection
118
+ }
119
120
121
// AddMethod adds method m unless it is already in the method list.
src/go/types/named.go
@@ -115,6 +115,9 @@ func (t *Named) SetUnderlying(underlying Type) {
122
123
0 commit comments