Fix LLVM code gen bug

This commit is contained in:
gingerBill
2020-06-22 16:57:21 +01:00
parent 0db1ebb4e5
commit 2b27300387
5 changed files with 40 additions and 20 deletions
+1 -2
View File
@@ -2683,10 +2683,9 @@ i64 check_array_count(CheckerContext *ctx, Operand *o, Ast *e) {
return 0;
}
Type *make_optional_ok_type(Type *value) {
Type *make_optional_ok_type(Type *value, bool typed) {
// LEAK TODO(bill): probably don't reallocate everything here and reuse the same one for the same type if possible
gbAllocator a = heap_allocator();
bool typed = true;
Type *t = alloc_type_tuple();
array_init(&t->Tuple.variables, a, 0, 2);
array_add (&t->Tuple.variables, alloc_entity_field(nullptr, blank_token, value, false, 0));