]> Cypherpunks repositories - gostls13.git/commitdiff
statements after panicln are unreachable, just like after panic.
authorRuss Cox <rsc@golang.org>
Tue, 7 Jul 2009 05:25:54 +0000 (22:25 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 7 Jul 2009 05:25:54 +0000 (22:25 -0700)
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

index d986e4b43cd2723c73f4e9f5b8cbe5a2c26e7809..398d61ec69dca49885e0f1226576496fe7e31e05 100644 (file)
@@ -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) {