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';
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With