aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/gc/dcl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gc/dcl.c')
-rw-r--r--src/cmd/gc/dcl.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/cmd/gc/dcl.c b/src/cmd/gc/dcl.c
index 05ec080392..99af18d9f1 100644
--- a/src/cmd/gc/dcl.c
+++ b/src/cmd/gc/dcl.c
@@ -679,15 +679,11 @@ typedcl2(Type *pt, Type *t)
ok:
n = pt->nod;
- *pt = *t;
- pt->method = nil;
+ copytype(pt->nod, t);
+ // unzero nod
pt->nod = n;
- pt->sym = n->sym;
+
pt->sym->lastlineno = parserline();
- pt->siggen = 0;
- pt->printed = 0;
- pt->deferwidth = 0;
- pt->local = 0;
declare(n, PEXTERN);
checkwidth(pt);