Skip to content

[Rtti] TValue.Cast<AnsiString> failed

test failed

CheckTrue('test_str' = TValue.{$ifdef fpc}specialize{$endif} From<ShortString>('test_str')
              .{$ifdef fpc}specialize{$endif} Cast<AnsiString>
              .{$ifdef fpc}specialize{$endif} AsType<AnsiString>, 'TValue.From<shortring>.Cast<AnsiString> failed');

TValue.CastStringToString does not handle casting TO tkAString, but returns True. The issue is similar to #41002 (closed) but 41002 is about casting FROM AnsiString

patch and test Patch.patch

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information