So, User-Defined Attributes

Philippe Sigaud philippe.sigaud at gmail.com
Fri Jan 4 12:49:47 PST 2013


On Fri, Jan 4, 2013 at 9:40 PM, Walter Bright <newshound2 at digitalmars.com>wrote:

> On 1/4/2013 9:48 AM, Max Samukha wrote:
>
>> It looks we simply cannot modify existing declarations with UDAs.
>>
>> @(attr) alias foo = bar; // @(attr) is ignored.
>>
>
> alias provides a way to provide an alternate name for a symbol. It
> wouldn't be an alternate name if it had different attributes. Trying to
> make such work would have serious semantic consequences.
>
> Hence, no, you cannot use alias to modify the attributes.
>
>
The (future) documentation says attributes can be used with declarations. I
tried to use one before a module declaration but it didn't work.

Is that a bug or are module declarations not 'real' declarations?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130104/783a1901/attachment.html>


More information about the Digitalmars-d mailing list