]> Cypherpunks repositories - gostls13.git/commitdiff
6g: update for spec change CL 30586
authorRuss Cox <rsc@golang.org>
Thu, 25 Jun 2009 21:44:45 +0000 (14:44 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 25 Jun 2009 21:44:45 +0000 (14:44 -0700)
R=ken
OCL=30593
CL=30756

src/cmd/gc/walk.c

index 22711bc7d50fcfa77ee7972753b8b76b13e8b62f..18fc7f33594ac72308f14f07afafbfd9d2d80291 100644 (file)
@@ -209,15 +209,8 @@ implicitstar(Node **nn)
        t = t->type;
        if(t == T)
                return;
-       switch(t->etype) {
-       case TMAP:
-       case TSTRING:
-       case TARRAY:
-       case TINTER:
-               break;
-       default:
+       if(!isfixedarray(t))
                return;
-       }
        n = nod(OIND, n, N);
        walktype(n, Elv);
        *nn = n;
@@ -1736,7 +1729,10 @@ lookdot(Node *n, Type *t)
                n->xoffset = f1->width;
                n->type = f1->type;
                if(t->etype == TINTER) {
-                       implicitstar(&n->left);
+                       if(isptr[n->left->type->etype]) {
+                               n->left = nod(OIND, n->left, N);        // implicitstar
+                               walktype(n->left, Elv);
+                       }
                        n->op = ODOTINTER;
                }
                return 1;