From c736b6579fcf376de2cdecd67f619832f8882a98 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 9 Oct 2009 16:01:32 -0700 Subject: [PATCH] bug209 R=ken OCL=35546 CL=35546 --- src/cmd/gc/typecheck.c | 2 +- test/{bugs => fixedbugs}/bug209.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename test/{bugs => fixedbugs}/bug209.go (88%) 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 -- 2.50.0