}
ANN static Type func_type(const Env env, const Func func) {
- const Type t = type_copy(env->gwion->mp, env->gwion->type[func->def->base->td ? et_function : et_lambda]);
+ const Type base = env->gwion->type[func->def->base->td ? et_function : et_lambda];
+ const Type t = type_copy(env->gwion->mp, base);
t->xid = ++env->scope->type_xid;
- t->e->parent = env->gwion->type[func->def->base->td ? et_function : et_lambda];
+ t->e->parent = base;
t->name = func->name;
t->e->owner = env->curr;
t->e->owner_class = env->class_def;