[fpc-devel] RTTI is always enabled??

Paul Ishenin ip at kmiac.ru
Thu Dec 10 11:22:09 CET 2009


10.12.2009 17:01, Graeme Geldenhuys wrote:

> This is a odd one (at least for me and another developer in tiOPF project).
> Why is RTTI information ALWAYS available?
>
> See the example project below. It always returns that RTTI information is
> available when clearly it should not.
>
> Kylix 3 help says that ClassInfo property should return nil if no RTTI is
> available. Tested with FPC 2.4.0-rc1, the test project below always prints
> that RTTI is available - which is wrong.

It is not the bug. This is a new feature required for showing of 
UnitName. Previosly this info was also available using TypeInfo() 
routine only compiler wrote nil pointer for the ClassInfo. Now it writes 
correct pointer.

This is delphi 2010 compatible behavior. Only info about published 
methods is not written for classes with {$M-}.

Best regards,
Paul Ishenin.




More information about the fpc-devel mailing list