FpDebug: Fix ".." intrinsic, reset error from previous elements (deref nil sets error on Expression, rather than value)

(cherry picked from commit 81596aa0bf)
This commit is contained in:
Martin 2023-09-03 14:44:39 +02:00
parent c3a1844be1
commit 127bb620e5

View File

@ -5191,6 +5191,12 @@ begin
if SlicePart.FCurrentIndex <> AIndex then begin
SlicePart.FCurrentIndex := AIndex;
FArraySlice.ResetEvaluationForIndex;
// Some evaluation errors (such as deref nil) are marked on the Expression,
// rather than on the value(s).
// If this code is called, the Expression should have been valid before.
FExpressionPart.Expression.FValid := True;
FExpressionPart.Expression.FError := nil;
end;
Result := FArraySlice.Items[0].ResultValue;