aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-18 01:06:26 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-18 01:06:26 -0400
commit7baf36e2ae9a1c3da919336102a591ab25ed4cfe (patch)
tree38816a6135129b50e3b1b456bb34b729dc2e7a76
parent708e7b9070deb8a0e9694241447242cbcdae17b1 (diff)
Remove dead code
-rw-r--r--types.c11
-rw-r--r--types.h1
2 files changed, 0 insertions, 12 deletions
diff --git a/types.c b/types.c
index b1269bbb..c1862e07 100644
--- a/types.c
+++ b/types.c
@@ -396,17 +396,6 @@ PUREFUNC bool is_numeric_type(type_t *t)
return t->tag == IntType || t->tag == BigIntType || t->tag == NumType;
}
-PUREFUNC bool supports_optionals(type_t *t)
-{
- switch (t->tag) {
- case BoolType: case ByteType: case CStringType: case BigIntType: case NumType: case TextType:
- case ArrayType: case SetType: case TableType: case FunctionType: case ClosureType:
- case PointerType: case IntType:
- return true;
- default: return false;
- }
-}
-
PUREFUNC size_t type_size(type_t *t)
{
#pragma GCC diagnostic ignored "-Wswitch-default"
diff --git a/types.h b/types.h
index 46469c65..d92e217d 100644
--- a/types.h
+++ b/types.h
@@ -148,7 +148,6 @@ PUREFUNC bool can_promote(type_t *actual, type_t *needed);
PUREFUNC const char *enum_single_value_tag(type_t *enum_type, type_t *t);
PUREFUNC bool is_int_type(type_t *t);
PUREFUNC bool is_numeric_type(type_t *t);
-PUREFUNC bool supports_optionals(type_t *t);
PUREFUNC size_t type_size(type_t *t);
PUREFUNC size_t type_align(type_t *t);
PUREFUNC size_t padded_type_size(type_t *t);