Name fixes

This commit is contained in:
Harold Brenes
2025-04-28 14:58:53 -04:00
parent 89533f49e4
commit 2dc5653fd1
2 changed files with 4 additions and 4 deletions

View File

@@ -418,14 +418,14 @@ gb_internal bool check_builtin_objc_procedure(CheckerContext *c, Operand *operan
self_type->Named.type_name != nullptr &&
self_type->Named.type_name->TypeName.objc_class_name != "")) {
gbString t = type_to_string(self_type);
error(self.expr, "'%.*s' expected a named type with the attribute @(obj_class=<string>) , got type %s", LIT(builtin_name), t);
error(self.expr, "'%.*s' expected a named type with the attribute @(objc_class=<string>) , got type %s", LIT(builtin_name), t);
gb_string_free(t);
return false;
}
if (self_type->Named.type_name->TypeName.objc_ivar == nullptr) {
gbString t = type_to_string(self_type);
error(self.expr, "'%.*s' requires that type %s have the attribute @(obj_ivar=<ivar_type_name>).", LIT(builtin_name), t);
error(self.expr, "'%.*s' requires that type %s have the attribute @(objc_ivar=<ivar_type_name>).", LIT(builtin_name), t);
gb_string_free(t);
return false;
}
@@ -442,7 +442,7 @@ gb_internal bool check_builtin_objc_procedure(CheckerContext *c, Operand *operan
gbString name_self = type_to_string(self_type);
gbString name_expected = type_to_string(self_type->Named.type_name->TypeName.objc_ivar);
gbString name_given = type_to_string(ivar_type);
error(self.expr, "'%.*s' ivar type %s does not match @obj_ivar type %s on Objective-C class %s.",
error(self.expr, "'%.*s' ivar type %s does not match @objc_ivar type %s on Objective-C class %s.",
LIT(builtin_name), name_given, name_expected, name_self);
gb_string_free(name_self);
gb_string_free(name_expected);

View File

@@ -1685,7 +1685,7 @@ gb_internal void lb_finalize_objc_names(lbGenerator *gen, lbProcedure *p) {
if (is_context_provider_ivar) {
// The context provider takes the ivar's type.
// Emit an obj_ivar_get call and use that pointer for 'self' instead.
// Emit an objc_ivar_get call and use that pointer for 'self' instead.
lbValue real_self {
wrapper_proc->raw_input_parameters[0],
class_ptr_type