[Issue 19068] __traits(identifier) returns the wrong string when importing a template from a module

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 6 20:33:48 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19068

Simen Kjaeraas <simen.kjaras at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |simen.kjaras at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
An alias is not a real identifier - thinks of it more as like a pointer to the
real identifier. This can be verified by doing the exact same as you did in
main.d, in mod.d:

auto identity(T)(T t) { return t; }
alias identityInt = identity!int;
static assert(__traits(identifier, identityInt) == "identity");

--


More information about the Digitalmars-d-bugs mailing list