bugfix with arrays in structures
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 1 Oct 2021 16:04:09 +0000 (11:04 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 1 Oct 2021 16:04:09 +0000 (11:04 -0500)
bin/onyx
src/types.c

index 8880c46c97b9a2f2e1171aaafe3fd8dda3171814..3db06439e05ab835055870dad6dd28f550381b29 100755 (executable)
Binary files a/bin/onyx and b/bin/onyx differ
index 175e826a15c3aba87f8b9a8be977fd14b3701275..c9d74d70b2e57dcf35021966f0a7b06fd2485be4 100644 (file)
@@ -1115,7 +1115,7 @@ b32 type_struct_is_simple(Type* type) {
 
     b32 is_simple = 1;
     bh_arr_each(StructMember *, mem, type->Struct.memarr) {
-        if (type_is_compound((*mem)->type)) {
+        if (type_is_compound((*mem)->type) || (*mem)->type->kind == Type_Kind_Array) {
             is_simple = 0;
             break;
         }