aboutsummaryrefslogtreecommitdiff
path: root/src/go/types/exprstring.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/go/types/exprstring.go')
-rw-r--r--src/go/types/exprstring.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/go/types/exprstring.go b/src/go/types/exprstring.go
index f05e6424d4..aee8a5ba5f 100644
--- a/src/go/types/exprstring.go
+++ b/src/go/types/exprstring.go
@@ -67,11 +67,11 @@ func WriteExpr(buf *bytes.Buffer, x ast.Expr) {
buf.WriteByte('.')
buf.WriteString(x.Sel.Name)
- case *ast.IndexExpr:
- WriteExpr(buf, x.X)
+ case *ast.IndexExpr, *ast.MultiIndexExpr:
+ ix := typeparams.UnpackIndexExpr(x)
+ WriteExpr(buf, ix.X)
buf.WriteByte('[')
- exprs := typeparams.UnpackExpr(x.Index)
- for i, e := range exprs {
+ for i, e := range ix.Indices {
if i > 0 {
buf.WriteString(", ")
}