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

gc: distinguish array, slice literal in error messages

R=ken2
CC=golang-dev
https://golang.org/cl/1138041
This commit is contained in:
Russ Cox 2010-05-06 09:34:12 -07:00
parent 20ba090978
commit 6dbba67214

View File

@ -251,7 +251,10 @@ exprfmt(Fmt *f, Node *n, int prec)
break; break;
case OARRAYLIT: case OARRAYLIT:
fmtprint(f, "slice literal"); if(isslice(n->type))
fmtprint(f, "slice literal");
else
fmtprint(f, "array literal");
break; break;
case OMAPLIT: case OMAPLIT: