Fixed some error handling for invalid if statements. Started if codegen.
This commit is contained in:
@@ -524,7 +524,11 @@ if_condition_has_to_be_boolean_type :: (checker : *Semantic_Checker, usage_site
|
||||
indent(*builder, 1);
|
||||
|
||||
var := from_handle(checker, handle);
|
||||
print_to_builder(*builder, "% has type %\n", print_from_source_location(*usage_site.children[0].source_location), proper_type_to_string(checker, var));
|
||||
|
||||
usage_child := usage_site.children[0];
|
||||
usage_loc := usage_child.source_location;
|
||||
|
||||
print_to_builder(*builder, "% has type %\n", print_from_source_location(*usage_loc), proper_type_to_string(checker, var));
|
||||
|
||||
message := builder_to_string(*builder,, temp);
|
||||
record_error(checker, message, usage_site.source_location, false);
|
||||
|
||||
Reference in New Issue
Block a user