From 5ab9d2befd7c37468121081a84188aa687678e13 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 5 Mar 2012 13:47:36 -0500 Subject: [PATCH] cmd/gc: show duplicate key in error R=ken2 CC=golang-dev https://golang.org/cl/5728064 --- src/cmd/gc/typecheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gc/typecheck.c b/src/cmd/gc/typecheck.c index 90bd24964e1..8b5578d250b 100644 --- a/src/cmd/gc/typecheck.c +++ b/src/cmd/gc/typecheck.c @@ -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; } }