Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I mark a property as deprecated in delphi?

I want to mark a property in Delphi as deprecated for removal later. According to the Delphi documentation deprecated may be appended to any declaration, but it's not working for properties. Is there a way to do this?

This is what I tried:

property SomeProp: string   read   FSomeProp   write  SetSomeProp; deprecated 'Use SomeOtherProp instead'; 
like image 901
Trellmor Avatar asked Feb 29 '12 13:02

Trellmor


1 Answers

No, this is not possible. According to the documentation,

The 'hint' directives platform, deprecated, and library may be appended to any declaration. These directives will produce warnings at compile time. Hint directives can be applied to type declarations, variable declarations, class, interface, and structure declarations, field declarations within classes or records, procedure, function, and method declarations, and unit declarations.

like image 57
Andreas Rejbrand Avatar answered Sep 22 '22 13:09

Andreas Rejbrand