__traits(getAttributes, ...) gets attributes for the first overload only

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 5 16:41:39 PST 2015


On Saturday, 5 December 2015 at 20:44:40 UTC, Andrei Alexandrescu 
wrote:
> Working on the big-oh thing I noticed that for an overloaded 
> function, __traits(getAttributes, ...) applied to overloaded 
> functions only fetches attributes for the first syntactically 
> present overload. Bug or feature?
>
> Andrei

In an ideal world I would want it to be an error to use 
__traits(getAttributes, ...) on anything ambiguous, would catch 
the odd bug. The current behaviour is dumb, but some union of 
attributes over the overload sets seems worse.


More information about the Digitalmars-d mailing list