]> Cypherpunks repositories - gostls13.git/commitdiff
fix bug:
authorRuss Cox <rsc@golang.org>
Tue, 7 Oct 2008 19:42:57 +0000 (12:42 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 7 Oct 2008 19:42:57 +0000 (12:42 -0700)
type T struct
export type T struct { a int }

was not exporting T

R=ken
OCL=16650
CL=16650

src/cmd/gc/dcl.c

index a0fb824fe3bc165c2d1b0a8e1508d22ca131e58b..7776816a407a74dfeebe8d0dffd855d13f04c469 100644 (file)
@@ -62,12 +62,15 @@ dodcltype(Type *n)
                switch(s->otype->etype) {
                case TFORWSTRUCT:
                case TFORWINTER:
-                       return s->otype;
+                       n = s->otype;
+                       goto found;
                }
        }
 
        // otherwise declare a new type
        addtyp(n, dclcontext);
+
+found:
        n->sym->local = 1;
        if(exportadj)
                exportsym(n->sym);