www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18884] New: getSymbolsByUDA fails on AliasSeq members


          Issue ID: 18884
           Summary: getSymbolsByUDA fails on AliasSeq members
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: elpenguino+D gmail.com

The following code started failing after DMD 2.078:
unittest {
    import std.meta;
    import std.traits;

    struct X {
        alias A = AliasSeq!(ulong, uint);

    alias x = getSymbolsByUDA!(X, X);

DMD 2.080.0 produces this error:

/path/to/dmd.linux/dmd2/linux/bin64/../../src/phobos/std/traits.d(8377): Error:
template `std.meta.Alias` does not match any template declaration
/path/to/dmd.linux/dmd2/linux/bin64/../../src/phobos/std/traits.d(8194): Error:
template instance `std.traits.getSymbolsByUDAImpl!(X, X, "A")` error
onlineapp.d(9):        instantiated from here: `getSymbolsByUDA!(X, X)`
The flawed line appears to be here: `alias member = Alias!(__traits(getMember,
symbol, names[0]));`

May 20 2018