FpDebug: FIX, Array-slices [n..m], check if they are in active part of condition. If not, don't create multiple results.

This commit is contained in:
Martin 2024-07-24 19:24:24 +02:00
parent 64b2dbfaea
commit f6c415d958

View File

@ -6587,6 +6587,7 @@ begin
FSlicePart.FCurrentIndex := FSlicePart.StartValue;
FSlicePart.FTouched := False;
ResetEvaluationForIndex;
Result := Items[0].ResultValue;
if not FSlicePart.FTouched then begin
@ -6595,6 +6596,13 @@ begin
exit;
end;
// Need to return an array, the array itself should not set an error (the 1st (or any) member may do)
// We need to get the error again later, when we get the first member
if IsError(Expression.FError) then
Items[0].ResetEvaluation;
Expression.FValid := True;
Expression.FError := nil;
if not FCheckedForVariantPart then begin
FSlicePart.CheckForVariantExpressionParts;
FCheckedForVariantPart := True;