From: Russ Cox Date: Tue, 7 Oct 2008 19:42:57 +0000 (-0700) Subject: fix bug: X-Git-Tag: weekly.2009-11-06~3032 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=96da920f1abe2301639c6e5b7ba637f6b413d6eb;p=gostls13.git fix bug: type T struct export type T struct { a int } was not exporting T R=ken OCL=16650 CL=16650 --- diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c index a0fb824fe3..7776816a40 100644 --- a/src/cmd/gc/dcl.c +++ b/src/cmd/gc/dcl.c @@ -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);