From cedae3039c8d67568b5ac35833c10cbfc1c7cb23 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 3 Apr 2025 15:01:23 -0400 Subject: Fix textual representation of table types --- src/types.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/types.c') diff --git a/src/types.c b/src/types.c index c4155c8d..d8ff377b 100644 --- a/src/types.c +++ b/src/types.c @@ -39,11 +39,7 @@ CORD type_to_cord(type_t *t) { } case TableType: { auto table = Match(t, TableType); - if (table->default_value) - return CORD_asprintf("{%r=%.*s}", type_to_cord(table->key_type), - table->default_value->end - table->default_value->start, table->default_value->start); - else - return CORD_asprintf("{%r:%r}", type_to_cord(table->key_type), type_to_cord(table->value_type)); + return CORD_all("{", type_to_cord(table->key_type), "=", type_to_cord(table->value_type), "}"); } case SetType: { auto set = Match(t, SetType); -- cgit v1.2.3