1
0
mirror of https://github.com/golang/go synced 2024-11-22 01:14:40 -07:00

gc: print x[y:] correctly

R=ken2
CC=golang-dev
https://golang.org/cl/955041
This commit is contained in:
Russ Cox 2010-04-20 17:39:31 -07:00
parent 20c50cf0f8
commit 4ba177ae36

View File

@ -297,7 +297,8 @@ exprfmt(Fmt *f, Node *n, int prec)
fmtprint(f, "[");
exprfmt(f, n->right->left, 0);
fmtprint(f, ":");
exprfmt(f, n->right->right, 0);
if(n->right->right != N)
exprfmt(f, n->right->right, 0);
fmtprint(f, "]");
break;