summaryrefslogtreecommitdiff
path: root/parse/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse/node.c')
-rw-r--r--parse/node.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/parse/node.c b/parse/node.c
index 0bc31c0..85f1763 100644
--- a/parse/node.c
+++ b/parse/node.c
@@ -207,15 +207,11 @@ mkfunc(Srcloc loc, Node **args, size_t nargs, Type *ret, Node *body)
f->func.type = mktyfunc(loc, args, nargs, ret);
f->func.env = mkenv();
+ bindtype(f->func.env, f->func.type);
st = body->block.scope;
for (i = 0; i < nargs; i++)
putdcl(st, args[i]);
- bindtype(f->func.env, ret);
- for (i = 0; i < nargs; i++)
- bindtype(f->func.env, decltype(args[i]));
-
-
n = mknode(loc, Nlit);
n->lit.littype = Lfunc;
n->lit.fnval = f;