mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 14:01:49 +02:00
FpDebug: Fix "=" and "<>" work with booleans
This commit is contained in:
parent
34b7126915
commit
0cd1374f3c
@ -4755,6 +4755,14 @@ function TFpPascalExpressionPartOperatorCompare.DoGetResultValue: TFpValue;
|
|||||||
r.Free;
|
r.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
function BoolEqual(ABoolVal, AOtherVal: TFpValue; AReverse: Boolean = False): TFpValue;
|
||||||
|
begin
|
||||||
|
Result := nil;
|
||||||
|
if (AOtherVal.Kind = skBoolean) then
|
||||||
|
Result := TFpValueConstBool.Create((ABoolVal.AsBool = AOtherVal.AsBool) xor AReverse)
|
||||||
|
else
|
||||||
|
SetError('= not supported');
|
||||||
|
end;
|
||||||
|
|
||||||
function IntGreaterThanValue(AIntVal, AOtherVal: TFpValue; AReverse: Boolean = False): TFpValue;
|
function IntGreaterThanValue(AIntVal, AOtherVal: TFpValue; AReverse: Boolean = False): TFpValue;
|
||||||
begin
|
begin
|
||||||
@ -4905,6 +4913,7 @@ begin
|
|||||||
skString, skAnsiString, skWideString, skChar{, skWideChar}:
|
skString, skAnsiString, skWideString, skChar{, skWideChar}:
|
||||||
Result := CharDataEqualToValue(tmp1, tmp2, (s = '<>'));
|
Result := CharDataEqualToValue(tmp1, tmp2, (s = '<>'));
|
||||||
skSet: Result := SetEqual(tmp1, tmp2, (s = '<>'));
|
skSet: Result := SetEqual(tmp1, tmp2, (s = '<>'));
|
||||||
|
skBoolean: Result := BoolEqual(tmp1, tmp2, (s = '<>'));
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user