Created attachment 741
Patch against dmd r621
__traits(identifier) tries to fold its argument to a constant. And symbols of
manifest constants cannot be obtained via the traits:
-------------------- test.d
enum symbol = 42;
pragma(msg, __traits(identifier, symbol), " = ", symbol);
--------------------
% dmd -c -o- test
test.d(2): Error: argument 42 has no identifier
false = 42
--------------------
For the 'identifier' traits, folding an argument to a constant does not make
sense. The proposed patch fixes the problem by disabling constfold on arguments
as done in the 'isSame' traits.
With the patch, the result gets corrected:
% dmd-patched -c -o- test
symbol = 42