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:
parent
20ba090978
commit
6dbba67214
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user