[fpc-devel] Differences between 'tsym' and 'tdef'
Alexander Klenin
klenin at gmail.com
Fri May 18 13:35:50 CEST 2012
On Fri, May 18, 2012 at 12:16 PM, Joost van der Sluis <joost at cnoc.nl> wrote:
> I think I can. But in Delphi you can also give a non-exsisting
> attribute, ie:
>
> TMyClass=class
> private
> FName: string;
> published
> [TThisTypeIsNowhereDefined('You','Can','Enter','Anything','here'1)]
> property Name: string read FName;
> end;
>
> This will compile in Delphi, but it won't work. This is especially
> annoying if you forgot to add the unit in which
> TThisTypeIsNowhereDefined is defined. In that case it will also compile,
> but it will not work. And you will seek for that error for long. I
> know. ;)
That's just evil. I hope FPC will check attributes at compile-time,
at least in objfpc mode?
--
Alexander S. Klenin
More information about the fpc-devel
mailing list