| ... | ... | @@ -150,7 +150,14 @@ static LLVMValueRef gen_fn_call_expr(CodeGen *g, AstNode *node) { |
| 150 | 150 | Buf *name = &fn_ref_expr->data.field_access_expr.field_name; |
| 151 | 151 | first_param_expr = fn_ref_expr->data.field_access_expr.struct_expr; |
| 152 | 152 | struct_type = get_expr_type(first_param_expr); |
| 153 | | fn_table_entry = struct_type->data.structure.fn_table.get(name); |
| 153 | if (struct_type->id == TypeTableEntryIdStruct) { |
| 154 | fn_table_entry = struct_type->data.structure.fn_table.get(name); |
| 155 | } else if (struct_type->id == TypeTableEntryIdPointer) { |
| 156 | assert(struct_type->data.pointer.child_type->id == TypeTableEntryIdStruct); |
| 157 | fn_table_entry = struct_type->data.pointer.child_type->data.structure.fn_table.get(name); |
| 158 | } else { |
| 159 | zig_unreachable(); |
| 160 | } |
| 154 | 161 | } else if (fn_ref_expr->type == NodeTypeSymbol) { |
| 155 | 162 | Buf *name = hack_get_fn_call_name(g, fn_ref_expr); |
| 156 | 163 | struct_type = nullptr; |