diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-19 15:14:00 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-19 15:14:00 -0400 |
| commit | ccdf9d319f796cbb30b245510931143c014636f5 (patch) | |
| tree | 4d961af2afd17d65a9be7045ca5b254a3e0360aa /types.c | |
| parent | 3aad698b2b198e3308a8d21c07465b2db6bbde2f (diff) | |
Bugfix
Diffstat (limited to 'types.c')
| -rw-r--r-- | types.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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"; |
