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

This commit is contained in:
Martin 2023-09-03 14:44:39 +02:00
parent b38ca94a08
commit 81596aa0bf

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;