diff options
Diffstat (limited to 'src/compile')
| -rw-r--r-- | src/compile/declarations.c | 5 | ||||
| -rw-r--r-- | src/compile/functions.c | 7 |
2 files changed, 1 insertions, 11 deletions
diff --git a/src/compile/declarations.c b/src/compile/declarations.c index f1c59f73..3b80bade 100644 --- a/src/compile/declarations.c +++ b/src/compile/declarations.c @@ -36,10 +36,7 @@ Text_t compile_declared_value(env_t *env, ast_t *declare_ast) { if (decl->value) { Text_t val_code = compile_maybe_incref(env, decl->value, t); - if (t->tag == FunctionType) { - assert(promote(env, decl->value, &val_code, t, Type(ClosureType, t))); - t = Type(ClosureType, t); - } + if (t->tag == FunctionType) assert(promote(env, decl->value, &val_code, t, Type(ClosureType, t))); return val_code; } else { Text_t val_code = compile_empty(t); diff --git a/src/compile/functions.c b/src/compile/functions.c index e1b9c89a..757df073 100644 --- a/src/compile/functions.c +++ b/src/compile/functions.c @@ -787,13 +787,6 @@ Text_t compile_function(env_t *env, Text_t name_code, ast_t *ast, Text_t *static Text_t qualified_name = Text$from_str(function_name); if (env->namespace && env->namespace->parent && env->namespace->name) qualified_name = Texts(env->namespace->name, ".", qualified_name); - Text_t text = Texts("func ", qualified_name, "("); - for (arg_ast_t *arg = args; arg; arg = arg->next) { - text = Texts(text, type_to_text(get_arg_ast_type(env, arg))); - if (arg->next) text = Texts(text, ", "); - } - if (ret_t && ret_t->tag != VoidType) text = Texts(text, "->", type_to_text(ret_t)); - text = Texts(text, ")"); return definition; } |
