www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18555] New: getSymbolsByUDA has strange behaviour on modules


          Issue ID: 18555
           Summary: getSymbolsByUDA has strange behaviour on modules
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: elpenguino+D gmail.com

import std.traits;

enum Something;

void foo() {}

void foo2() {}

static assert(getSymbolsByUDA!(mixin(__MODULE__), Something).length == 2);

This worked up until DMD 2.079. Now it returns no symbols instead of the
expected 2.

In some cases it appears to return a single symbol (out of several) but I could
not determine why, nor manage to reduce an example.

Mar 04 2018