Fixed another, 50 tests passing
This commit is contained in:
@@ -950,7 +950,7 @@ fun unify_type(template_type: *tree<symbol>, param_type: *type, new_map: *map<st
|
|||||||
println(param_type->parameter_types.size)
|
println(param_type->parameter_types.size)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (var i = 0; i < template_function_types.size; i++;)
|
for (var i = 0; i < template_function_types.size-1; i++;)
|
||||||
unify_type(template_function_types[i], param_type->parameter_types[i], new_map, template_replacements)
|
unify_type(template_function_types[i], param_type->parameter_types[i], new_map, template_replacements)
|
||||||
unify_type(template_function_types.last(), param_type->return_type, new_map, template_replacements)
|
unify_type(template_function_types.last(), param_type->return_type, new_map, template_replacements)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -598,7 +598,10 @@ obj c_generator (Object) {
|
|||||||
call_string.value = ""
|
call_string.value = ""
|
||||||
} else {
|
} else {
|
||||||
var func_type = get_ast_type(node->function_call.func)
|
var func_type = get_ast_type(node->function_call.func)
|
||||||
call_string.pre += string("if (")+func_name+".data) " + pre_call + " = ((" + type_to_c(func_type) + "_with_data) "+func_name+".func)("+func_name +".data," + call_string.value + ");\n"
|
call_string.pre += string("if (")+func_name+".data) " + pre_call + " = ((" + type_to_c(func_type) + "_with_data) "+func_name+".func)("+func_name +".data"
|
||||||
|
if (call_string.value != "")
|
||||||
|
call_string.pre += string(",") + call_string.value
|
||||||
|
call_string.pre += ");\n"
|
||||||
call_string.pre += string("else ") + pre_call + " = ((" + type_to_c(func_type) + "_without_data) " + func_name+".func)(" + call_string.value + ");\n"
|
call_string.pre += string("else ") + pre_call + " = ((" + type_to_c(func_type) + "_without_data) " + func_name+".func)(" + call_string.value + ");\n"
|
||||||
call_string.value = pre_call
|
call_string.value = pre_call
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user