mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 00:29:48 +02:00
* Return delphi-compatible output for TValue.ToString when empty
This commit is contained in:
parent
cbc938900f
commit
9c5bfbeb78
@ -3984,6 +3984,8 @@ end;
|
||||
|
||||
function TValue.ToString: String;
|
||||
begin
|
||||
if IsEmpty then
|
||||
Exit('(empty)');
|
||||
case Kind of
|
||||
tkWString,
|
||||
tkUString : result := AsUnicodeString;
|
||||
@ -4000,7 +4002,7 @@ begin
|
||||
tkChar: Result := AnsiChar(FData.FAsUByte);
|
||||
tkWChar: Result := UTF8Encode(WideChar(FData.FAsUWord));
|
||||
else
|
||||
result := '';
|
||||
result := '<unknown kind>';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user