return (cast(^Type_Info_Struct) struct_info).constructed_from == base_type;
}
+struct_inherits :: (struct_type: type_expr, base_type: type_expr) -> bool {
+ struct_info := cast(^Type_Info_Struct) get_type_info(struct_type);
+ if struct_info.kind != .Struct do return false;
+
+ first_member := ^struct_info.members[0];
+ return first_member.used && first_member.type == base_type;
+}
+
#operator == (t1: Type_Info_Function, t2: Type_Info_Function) -> bool {
if t1.parameter_types.count != t2.parameter_types.count do return false;
if t1.return_type != t2.return_type do return false;
138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180
];
- p :: macro (x: i32) => cast(i32) permutations[x % 256];
+ p :: macro (x: i32) -> i32 {
+ permutations :: permutations;
+ return cast(i32) permutations[x % 256];
+ }
}
if (block->body) {
AstNode** start = &block->body;
- fori (i, 0, block->statement_idx) {
- start = &(*start)->next;
- }
+ // fori (i, 0, block->statement_idx) {
+ // start = &(*start)->next;
+ // }
b32 remove = 0;