[fpc-pascal] SetPropValue: value as string does not work for Chars and Booleans

Michael Van Canneyt michael at freepascal.org
Sat Jun 13 12:04:56 CEST 2015



On Sat, 13 Jun 2015, silvioprog wrote:

> On Thu, Jun 11, 2015 at 2:26 AM, silvioprog <silvioprog at gmail.com> wrote:
>       Hello,
> Trying to set the value 'a' to a property Char and a 'True' to a Boolean property, I got some errors (logs in attached) in function 'TypInfo.SetPropValue'. But I did the same test in Delphi XE
> 7 and also in Delphi 7 (after some changes in my demo, shure), and it worked fine. So I decided to test other property types looking for more errors.
> 
> I attached a small project simulating a test-case, testing the function 'TypInfo.SetPropValue' with commum primitive types in FPC and Delphi.
> 
> Please see the LOG_*.TXT files, it has the comparition between FPC (trunk) and Delphi  (XE7), both tests done in 32 and 64 CPUs.
> 
> Is this bug or a normal behaviour of FPC RTTI? If you confirm it as but, I can try to send a patch to fix that.
> 
> Thank you!
> 
> 
> Nobody? =/
> 
> It seems that current FPC SetPropValue looks like Delphi 7, but IMHO this function could follow the new Delphi implementation, including new unicode support. BTW, if anyone confirm it as bug, I can
> try to make a patch and send it via bugtracker.
>

Please do. Include your test program.

Michael.


More information about the fpc-pascal mailing list