aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types.c b/types.c
index 0a379dd8..d7114a92 100644
--- a/types.c
+++ b/types.c
@@ -47,9 +47,9 @@ CORD type_to_cord(type_t *t) {
}
case PointerType: {
auto ptr = Match(t, PointerType);
- CORD sigil = ptr->is_stack ? "&" : (ptr->is_optional ? "?" : "@");
+ CORD sigil = ptr->is_stack ? "&" : "@";
if (ptr->is_readonly) sigil = CORD_cat(sigil, "%");
- return CORD_cat(sigil, type_to_cord(ptr->pointed));
+ return CORD_all(sigil, type_to_cord(ptr->pointed), ptr->is_optional ? "?" : CORD_EMPTY);
}
case EnumType: {
auto tagged = Match(t, EnumType);