]> Cypherpunks repositories - gostls13.git/commitdiff
bug209
authorRuss Cox <rsc@golang.org>
Fri, 9 Oct 2009 23:01:32 +0000 (16:01 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 9 Oct 2009 23:01:32 +0000 (16:01 -0700)
R=ken
OCL=35546
CL=35546

src/cmd/gc/typecheck.c
test/fixedbugs/bug209.go [moved from test/bugs/bug209.go with 88% similarity]

index 9a3b42978485730e38d6368c0caba0072460b5e0..826d740cc8979a771b8a81a521c89f399b0684b6 100644 (file)
@@ -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;
similarity index 88%
rename from test/bugs/bug209.go
rename to test/fixedbugs/bug209.go
index 978016a3baad22db2f511d4d2a36c4cae992d06d..ae6f10f60387c02f7c1855b9a4e2e1a3324acba5 100644 (file)
@@ -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