]> Cypherpunks repositories - gostls13.git/commitdiff
gc: fix wrong arguments to error message for switches.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Mon, 12 Dec 2011 21:08:32 +0000 (16:08 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 12 Dec 2011 21:08:32 +0000 (16:08 -0500)
Fixes #2502.

R=golang-dev, rsc
CC=golang-dev, remy
https://golang.org/cl/5472062

src/cmd/gc/swt.c

index 786fdf938d9065a75385f9e52e31677d6d65f5d5..7764f0dd3562f8c792de0ca27e9e1b446718dd9d 100644 (file)
@@ -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);
                                        }