deprecated alias

Lars Ivar Igesund larsivar at igesund.net
Sat Feb 17 03:33:35 PST 2007


Chris Miller wrote:

> On Fri, 16 Feb 2007 16:37:40 -0500, kris <foo at bar.com> wrote:
> 
>> Syntactically, the compiler allows "deprecated alias foo bar;"  but the
>> deprecated attribute is apparently ignored?
>>
>> Is this intentional?
> 
> I did notice deprecated isn't working in all cases, and it seemed to me
> that it's only working when accessing deprecated things in other code. It
> might just be a bug and isn't quite happening this way, but it's what I
> got from it, and I realized it would be a decent way of handling it.
> If my code accesses a deprecated thing from within the same file, it's
> quite OK; like private. It's probably just happening to support the
> deprecated feature. e.g. a deprecated function calling another deprecated
> function in the same file shouldn't require -d; it might be just a stub
> with different parameters calling the full implementation, or calling a
> helper function that is also deprecated, in order to continue supporting a
> deprecated feature.

I tried to test this, and the compiler did not pick up the deprecated alias
if used in the client code. An additional factor that may have played a
role in this particular test was that it was a .di file.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list