cmd/gc: show duplicate key in error

R=ken2
CC=golang-dev
https://golang.org/cl/5728064
This commit is contained in:
Russ Cox 2012-03-05 13:47:36 -05:00
parent 1b311776c4
commit 5ab9d2befd

View file

@ -1964,7 +1964,7 @@ keydup(Node *n, Node *hash[], ulong nhash)
b = cmp.val.u.bval;
if(b) {
// too lazy to print the literal
yyerror("duplicate key in map literal");
yyerror("duplicate key %N in map literal", n);
return;
}
}