We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff8115d commit 76dd01fCopy full SHA for 76dd01f
src/cmd/compile/internal/types2/operand.go
@@ -176,17 +176,14 @@ func operandString(x *operand, qf Qualifier) string {
176
if hasType {
177
if x.typ != Typ[Invalid] {
178
var intro string
179
- var tpar *TypeParam
180
if isGeneric(x.typ) {
181
intro = " of parameterized type "
182
- } else if tpar = asTypeParam(x.typ); tpar != nil {
183
- intro = " of type parameter "
184
} else {
185
intro = " of type "
186
}
187
buf.WriteString(intro)
188
WriteType(&buf, x.typ, qf)
189
- if tpar != nil {
+ if tpar := asTypeParam(x.typ); tpar != nil {
190
buf.WriteString(" constrained by ")
191
WriteType(&buf, tpar.bound, qf) // do not compute interface type sets here
192
0 commit comments