aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-02-28 19:30:40 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-02-28 19:30:40 -0500
commite81b7b998a6218f524d5d6c41e98e07d1f5b10b4 (patch)
treeb5b81545979dafcdfb751b0b167e2ed4bb6aad39
parentafed6362523f05b0656a75c4bbcecbb9618c5a61 (diff)
Fix stringification of function type
-rw-r--r--compile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index b7b94efc..8ef7ab03 100644
--- a/compile.c
+++ b/compile.c
@@ -4219,9 +4219,8 @@ CORD compile_function(env_t *env, ast_t *ast, CORD *staticdefs)
if (arg->next) text = CORD_cat(text, ", ");
}
if (ret_t && ret_t->tag != VoidType)
- text = CORD_all(text, ")->", type_to_cord(ret_t));
- else
- text = CORD_all(text, ")");
+ text = CORD_all(text, "->", type_to_cord(ret_t));
+ text = CORD_all(text, ")");
if (!fndef->is_inline) {
env->code->function_naming = CORD_all(