Commit 74b546ae authored by Russ Cox's avatar Russ Cox

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
parent 58c4142e
...@@ -49,6 +49,7 @@ loop: ...@@ -49,6 +49,7 @@ loop:
case OGOTO: case OGOTO:
case OPANIC: case OPANIC:
case OPANICN:
case ORETURN: case ORETURN:
return 0; return 0;
} }
...@@ -137,6 +138,7 @@ loop: ...@@ -137,6 +138,7 @@ loop:
yyerror("walkstate: %S not a top level statement", n->sym); yyerror("walkstate: %S not a top level statement", n->sym);
else else
yyerror("walkstate: %O not a top level statement", n->op); yyerror("walkstate: %O not a top level statement", n->op);
break;
case OASOP: case OASOP:
case OAS: case OAS:
...@@ -1699,8 +1701,6 @@ lookdot1(Sym *s, Type *t, Type *f) ...@@ -1699,8 +1701,6 @@ lookdot1(Sym *s, Type *t, Type *f)
r = T; r = T;
for(; f!=T; f=f->down) { for(; f!=T; f=f->down) {
if(f->sym == S)
continue;
if(f->sym != s) if(f->sym != s)
continue; continue;
if(r != T) { if(r != T) {
...@@ -1732,7 +1732,6 @@ lookdot(Node *n, Type *t) ...@@ -1732,7 +1732,6 @@ lookdot(Node *n, Type *t)
if(f2 != T) if(f2 != T)
yyerror("ambiguous DOT reference %S as both field and method", yyerror("ambiguous DOT reference %S as both field and method",
n->right->sym); n->right->sym);
n->right = f1->nname; // substitute real name
n->xoffset = f1->width; n->xoffset = f1->width;
n->type = f1->type; n->type = f1->type;
if(t->etype == TINTER) { if(t->etype == TINTER) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment