From: Russ Cox Date: Fri, 9 Oct 2009 23:01:32 +0000 (-0700) Subject: bug209 X-Git-Tag: weekly.2009-11-06~360 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c736b6579fcf376de2cdecd67f619832f8882a98;p=gostls13.git bug209 R=ken OCL=35546 CL=35546 --- diff --git a/src/cmd/gc/typecheck.c b/src/cmd/gc/typecheck.c index 9a3b429784..826d740cc8 100644 --- a/src/cmd/gc/typecheck.c +++ b/src/cmd/gc/typecheck.c @@ -934,7 +934,7 @@ reswitch: typechecklist(n->ninit, Etop); typecheck(&n->ntest, Erv); if(n->ntest != N && (t = n->ntest->type) != T && t->etype != TBOOL) - yyerror("non-bool %+N used as for condition"); + yyerror("non-bool %+N used as for condition", n->ntest); typecheck(&n->nincr, Etop); typechecklist(n->nbody, Etop); goto ret; diff --git a/test/bugs/bug209.go b/test/fixedbugs/bug209.go similarity index 88% rename from test/bugs/bug209.go rename to test/fixedbugs/bug209.go index 978016a3ba..ae6f10f603 100644 --- a/test/bugs/bug209.go +++ b/test/fixedbugs/bug209.go @@ -1,4 +1,4 @@ -// $G $D/$F.go || echo BUG: should compile +// errchk $G $D/$F.go // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style