[Issue 24227] New: Add a trait to check if symbol is an alias
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Nov  4 13:21:10 UTC 2023
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24227
          Issue ID: 24227
           Summary: Add a trait to check if symbol is an alias
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: msnmancini at hotmail.com
I have been trying to auto generate some code, and then I've found this
problem:
```d
class MyClass
{
    void member1();
    alias mem = member1;
}
static foreach(mem; __traits(derivedMembers, MyClass))
{
    pragma(msg, __traits(getMember, MyClass, mem).stringof); //member1 printed
twice
}
```
This way, I can't dynamically generate code where I have aliases.
Related Issue? https://issues.dlang.org/show_bug.cgi?id=19029
--
    
    
More information about the Digitalmars-d-bugs
mailing list