Skip to content

Commit 76d9df3

Browse files
committed
fixed defect in workaround for RSP-31615 on Win64
1 parent 07da2d0 commit 76d9df3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Source/Base/Collections/Spring.Collections.Base.pas

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ TEnumerableBase = class abstract(TRefCountedObject)
116116

117117
TEnumerableBase<T> = class abstract(TEnumerableBase)
118118
{$IFDEF RSP31615}
119-
private type FuncInternal = reference to procedure(const arg1, arg2: T; var result);
119+
private type FuncInternal = reference to procedure(
120+
{$IFDEF CPUX64}var result;{$ENDIF}
121+
const arg1, arg2: T
122+
{$IFDEF CPUX86}; var result{$ENDIF});
120123
{$ENDIF}
121124
protected
122125
fComparer: IComparer<T>;
@@ -1019,7 +1022,7 @@ function TEnumerableBase<T>.Aggregate(const func: Func<T, T, T>): T;
10191022
if IsManagedType(T) then
10201023
begin
10211024
IEnumeratorInternal(enumerator).GetCurrent(item);
1022-
FuncInternal(func)(Result, item, res);
1025+
FuncInternal(func)({$IFDEF CPUX64}res, {$ENDIF}Result, item{$IFDEF CPUX86}, res{$ENDIF});
10231026
Result := res;
10241027
end
10251028
else

0 commit comments

Comments
 (0)