From ccdf9d319f796cbb30b245510931143c014636f5 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 19 Aug 2024 15:14:00 -0400 Subject: Bugfix --- types.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'types.c') diff --git a/types.c b/types.c index a1935616..5fb591ca 100644 --- a/types.c +++ b/types.c @@ -13,7 +13,10 @@ CORD type_to_cord(type_t *t) { switch (t->tag) { case UnknownType: return "???"; case AbortType: return "Abort"; - case ReturnType: return CORD_all("Return(", type_to_cord(Match(t, ReturnType)->ret), ")"); + case ReturnType: { + type_t *ret = Match(t, ReturnType)->ret; + return CORD_all("Return(", ret ? type_to_cord(ret) : "Void", ")"); + } case VoidType: return "Void"; case MemoryType: return "Memory"; case BoolType: return "Bool"; -- cgit v1.2.3