mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 13:59:28 +02:00
* Allow Boolean -> TValue
This commit is contained in:
parent
5887b1fee3
commit
eb08fd88f2
@ -1619,7 +1619,13 @@ end;
|
||||
|
||||
function TJSONBool.AsTValue(aTypeInfo: PTypeInfo; var aValue: TValue): Boolean;
|
||||
begin
|
||||
Result:=inherited AsTValue(aTypeInfo, aValue);
|
||||
if aTypeInfo^.Kind=tkBool then
|
||||
begin
|
||||
TValue.Make(@FValue,aTypeInfo,aValue);
|
||||
Result:=True;
|
||||
end
|
||||
else
|
||||
Result:=inherited AsTValue(aTypeInfo, aValue);
|
||||
end;
|
||||
|
||||
constructor TJSONBool.Create(aValue: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user