summaryrefslogtreecommitdiff
path: root/src/cmd/gc/closure.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gc/closure.c')
-rw-r--r--src/cmd/gc/closure.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/gc/closure.c b/src/cmd/gc/closure.c
index cc44d7f6b..2043ab0ed 100644
--- a/src/cmd/gc/closure.c
+++ b/src/cmd/gc/closure.c
@@ -13,7 +13,7 @@
void
closurehdr(Node *ntype)
{
- Node *n, *name, *a;
+ Node *n, *name, *a, *orig;
NodeList *l;
n = nod(OCLOSURE, N, N);
@@ -43,8 +43,11 @@ closurehdr(Node *ntype)
}
for(l=n->rlist; l; l=l->next) {
name = l->n->left;
- if(name)
+ if(name) {
+ orig = name->orig; // preserve the meaning of orig == N (anonymous PPARAMOUT)
name = newname(name->sym);
+ name->orig = orig;
+ }
ntype->rlist = list(ntype->rlist, nod(ODCLFIELD, name, l->n->right));
}
}