Skip to content

Commit fa65e38

Browse files
committed
Fix NearestAncestorClass handling in ExposeMethods.
1 parent e22e60d commit fa65e38

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/WrapDelphi.pas

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3264,8 +3264,9 @@ class procedure TPyDelphiObject.ExposeMethods(AClass: TClass;
32643264
Continue;
32653265

32663266
// Skip methods decleared in NearestAncestorClass and its ancestors
3267-
if (NearestAncestorClass <> nil) and ((AClass = NearestAncestorClass) or
3268-
not (AClass.InheritsFrom(NearestAncestorClass)))
3267+
LClass := (LRttiMethod.Parent as TRttiInstanceType).MetaclassType;
3268+
if (NearestAncestorClass <> nil) and ((LClass = NearestAncestorClass) or
3269+
not (LClass.InheritsFrom(NearestAncestorClass)))
32693270
then
32703271
Continue;
32713272

0 commit comments

Comments
 (0)