You cannot assign an open array to a dynamic array. See Open Array Parameters
.
Note: The syntax of open array parameters resembles that of dynamic array types, but they do not mean the same thing. The previous example creates a function that takes any array of Char elements, including (but not limited to) dynamic arrays. To declare parameters that must be dynamic arrays, you need to specify a type identifier:
type TDynamicCharArray = array of Char;
function Find(const A: TDynamicCharArray): Integer;
A good summary of the use case of open arrays
and the difference with a dynamic array can be found here: Open array parameters
.
If you have a Delphi version that supports generics, it is possible to declare the constructor header:
constructor TGenericHoldingResultSet.Create(parent : TGenericHoldingSummary;
const resArr : TArray<TGenericHoldingResult>);
and your resultArray
as TArray<TGenericHoldingResult>
.
This will avoid having to declare a specific type for the array.
As noted by David, open arrays have a benefit since they have a broader use case, and should be used when possible.