aboutsummaryrefslogtreecommitdiff
path: root/src/types.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-03 15:01:23 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-03 15:01:23 -0400
commitcedae3039c8d67568b5ac35833c10cbfc1c7cb23 (patch)
tree1b1ff363a3c2be77d26acfb1a55dd267ec073f3e /src/types.c
parent59993b85301071540a90a0e97df27e83000f77f7 (diff)
Fix textual representation of table types
Diffstat (limited to 'src/types.c')
-rw-r--r--src/types.c6
1 files changed, 1 insertions, 5 deletions
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);