Skip to content

Commit b7ab012

Browse files
committed
fix: corrected an issue that prevented access to an object's private properties via static method invocation
1 parent 38be073 commit b7ab012

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

argon/vm/datatype/arobject.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ ArObject *type_get_attr(const ArObject *instance, ArObject *key, bool static_att
8282
return nullptr;
8383
}
8484

85+
if (static_attr && AR_TYPEOF(instance, type_type_))
86+
ancestor = (TypeInfo *) instance;
87+
8588
if (!aprop.IsPublic() && !TraitIsImplemented(ancestor, base)) {
8689
ErrorFormat(kAccessViolationError[0], kAccessViolationError[1],
8790
ARGON_RAW_STRING((String *) key), ancestor->name);

0 commit comments

Comments
 (0)