File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
cmd/compile/internal/types2 Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,9 @@ func (t *Named) SetUnderlying(underlying Type) {
113
113
panic ("underlying type must not be *Named" )
114
114
}
115
115
t .resolve (nil ).underlying = underlying
116
+ if t .fromRHS == nil {
117
+ t .fromRHS = underlying // for cycle detection
118
+ }
116
119
}
117
120
118
121
// AddMethod adds method m unless it is already in the method list.
Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ func (t *Named) SetUnderlying(underlying Type) {
115
115
panic ("underlying type must not be *Named" )
116
116
}
117
117
t .resolve (nil ).underlying = underlying
118
+ if t .fromRHS == nil {
119
+ t .fromRHS = underlying // for cycle detection
120
+ }
118
121
}
119
122
120
123
// AddMethod adds method m unless it is already in the method list.
You can’t perform that action at this time.
0 commit comments