From 74b546aefdc712ae95171a75cd3910306f22545f Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 6 Jul 2009 22:25:54 -0700 Subject: [PATCH] statements after panicln are unreachable, just like after panic. missing break after error. dot symbol bug fix: leave sym alone (was incorrect for inserted cross-package dots). R=ken OCL=31234 CL=31236 --- src/cmd/gc/walk.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index d986e4b43c..398d61ec69 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -49,6 +49,7 @@ loop: case OGOTO: case OPANIC: + case OPANICN: case ORETURN: return 0; } @@ -137,6 +138,7 @@ loop: yyerror("walkstate: %S not a top level statement", n->sym); else yyerror("walkstate: %O not a top level statement", n->op); + break; case OASOP: case OAS: @@ -1699,8 +1701,6 @@ lookdot1(Sym *s, Type *t, Type *f) r = T; for(; f!=T; f=f->down) { - if(f->sym == S) - continue; if(f->sym != s) continue; if(r != T) { @@ -1732,7 +1732,6 @@ lookdot(Node *n, Type *t) if(f2 != T) yyerror("ambiguous DOT reference %S as both field and method", n->right->sym); - n->right = f1->nname; // substitute real name n->xoffset = f1->width; n->type = f1->type; if(t->etype == TINTER) {