// TODO: we could check first if there a matching existing one
Func_Base *const fbase = cpy_func_base(env->gwion->mp, bin->lhs->info->type->e->d.func->def->base);
const Fptr_Def fptr_def = new_fptr_def(env->gwion->mp, fbase, bin->lhs->info->type->e->d.func->def->flag);
- m_str name = NULL;
- asprintf(&name, "generated@%u:%u", bin->rhs->pos->first.line, bin->rhs->pos->first.column);
+ char name[13 + strlen(env->curr->name) +
+ num_digit(bin->rhs->pos->first.line) + num_digit(bin->rhs->pos->first.column)];
+ sprintf(name, "generated@%s@%u:%u", env->curr->name, bin->rhs->pos->first.line, bin->rhs->pos->first.column);
fptr_def->base->xid = insert_symbol(name);
- free(name);
const m_bool ret = traverse_fptr_def(env, fptr_def);
const Type t = fptr_def->type;
free_fptr_def(env->gwion->mp, fptr_def);