uda pattern foo and foo(val)

Adam D. Ruppe destructionator at gmail.com
Wed Sep 23 02:20:31 UTC 2020


On Wednesday, 23 September 2020 at 02:07:04 UTC, Steven 
Schveighoffer wrote:
> I just said pragma(msg, __traits(getAttributes, z))

Ah, ok, this is weird, `pragma(msg, __traits(getAttributes, 
z)[0])` works just fine!

But that might be adequate for you - just loop over the 
attributes and use them one by one. Which you'd do anyway.

I suspect this is overload resolution not happening yet when you 
getAttributes but then it happens when it is forced evaluated 
with the index. (prolly one of those order-of-semantic bugs in 
dmd)



More information about the Digitalmars-d-learn mailing list