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