mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-09-27 04:49:10 +02:00
* Patch from Henrique Werlang to correct sort order in GetMethods
This commit is contained in:
parent
5aafee91b1
commit
69c9c7ce6d
@ -731,14 +731,15 @@ begin
|
|||||||
Inc(MethodCount, BaseClass.StructTypeInfo.MethodCount);
|
Inc(MethodCount, BaseClass.StructTypeInfo.MethodCount);
|
||||||
BaseClass := BaseClass.GetAncestor;
|
BaseClass := BaseClass.GetAncestor;
|
||||||
end;
|
end;
|
||||||
SetLength(Result, StructTypeInfo.MethodCount);
|
SetLength(Result, MethodCount);
|
||||||
BaseClass := Self;
|
BaseClass := Self;
|
||||||
|
MethodCount:=0;
|
||||||
while Assigned(BaseClass) do
|
while Assigned(BaseClass) do
|
||||||
begin
|
begin
|
||||||
for A := 0 to Pred(BaseClass.StructTypeInfo.MethodCount) do
|
for A := 0 to Pred(BaseClass.StructTypeInfo.MethodCount) do
|
||||||
begin
|
begin
|
||||||
Dec(MethodCount);
|
|
||||||
Result[MethodCount] := TRttiMethod.Create(BaseClass, BaseClass.StructTypeInfo.GetMethod(A));
|
Result[MethodCount] := TRttiMethod.Create(BaseClass, BaseClass.StructTypeInfo.GetMethod(A));
|
||||||
|
Inc(MethodCount);
|
||||||
end;
|
end;
|
||||||
BaseClass := BaseClass.GetAncestor;
|
BaseClass := BaseClass.GetAncestor;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user