From 09423f6d42d86c62beefa4607fba41e3698f1850 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 5 Mar 2025 18:47:05 -0500 Subject: Tweak function type spacing when converting it to text --- types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types.c b/types.c index 0f4fbbfd..c8cb4e33 100644 --- a/types.c +++ b/types.c @@ -58,10 +58,10 @@ CORD type_to_cord(type_t *t) { auto fn = Match(t, FunctionType); for (arg_t *arg = fn->args; arg; arg = arg->next) { c = CORD_cat(c, type_to_cord(arg->type)); - if (arg->next) c = CORD_cat(c, ", "); + if (arg->next) c = CORD_cat(c, ","); } if (fn->ret && fn->ret->tag != VoidType) - c = CORD_all(c, "->", type_to_cord(fn->ret)); + c = CORD_all(c, fn->args ? " -> " : "-> ", type_to_cord(fn->ret)); c = CORD_all(c, ")"); return c; } -- cgit v1.2.3