aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorHarold Brenes <harold@hbrenes.com>2025-04-22 19:16:29 -0400
committerHarold Brenes <harold@hbrenes.com>2025-04-22 19:18:53 -0400
commitbca02f81cd5affa288bac0cc0ed08fe730072aec (patch)
tree1a8cea710264b1cbacc079fb516ba800320e4341 /src/types.cpp
parentb3b4d501ca6c1af70c0ceef7610f6c5d83a2d296 (diff)
Include the ivar in the Objective-C class unconditionally of it being used or not.
Allow pseudo-fields for ivar access.
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 1b2545279..96c17f49a 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -3329,6 +3329,15 @@ gb_internal Selection lookup_field_with_selection(Type *type_, String field_name
}
}
}
+
+ Type *objc_ivar_type = e->TypeName.objc_ivar;
+ if (objc_ivar_type != nullptr) {
+ sel = lookup_field_with_selection(objc_ivar_type, field_name, false, sel, allow_blank_ident);
+ if (sel.entity != nullptr) {
+ sel.pseudo_field = true;
+ return sel;
+ }
+ }
}
if (is_type_polymorphic(type)) {