commit 8efc042aa4887ab24299cb60ad8ca74704cec15e
parent 015f4d24022a2a2722a56c6d8443a93fefb2fe7f
Author: Drew DeVault <sir@cmpwn.com>
Date: Fri, 1 Jan 2021 13:15:02 -0500
type store: specify array/slice casts
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/type_store.c b/src/type_store.c
@@ -158,6 +158,8 @@ type_is_castable(const struct type *to,
|| to->storage == TYPE_STORAGE_UINTPTR;
case TYPE_STORAGE_SLICE:
case TYPE_STORAGE_ARRAY:
+ return to->storage == TYPE_STORAGE_SLICE
+ || to->storage == TYPE_STORAGE_ARRAY;
case TYPE_STORAGE_ALIAS:
case TYPE_STORAGE_TAGGED_UNION:
assert(0); // TODO