From d7634ad7d9a3b914245fba89cb9737f12c07dfe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Oudompheng?= Date: Mon, 12 Dec 2011 16:08:32 -0500 Subject: [PATCH] gc: fix wrong arguments to error message for switches. Fixes #2502. R=golang-dev, rsc CC=golang-dev, remy https://golang.org/cl/5472062 --- src/cmd/gc/swt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gc/swt.c b/src/cmd/gc/swt.c index 786fdf938d..7764f0dd35 100644 --- a/src/cmd/gc/swt.c +++ b/src/cmd/gc/swt.c @@ -878,7 +878,7 @@ typecheckswitch(Node *n) if(n->ntest) yyerror("invalid case %N in switch on %N (mismatched types %T and %T)", ll->n, n->ntest, ll->n->type, t); else - yyerror("invalid case %N in switch (mismatched types %T and bool)", ll->n, n->ntest, ll->n->type, t); + yyerror("invalid case %N in switch (mismatched types %T and bool)", ll->n, ll->n->type); } else if(nilonly && !isconst(ll->n, CTNIL)) { yyerror("invalid case %N in switch (can only compare %s %N to nil)", ll->n, nilonly, n->ntest); }