[Issue 24183] New: getSymbolsByUDA does no longer works on templatized functions
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Oct 11 01:44:39 UTC 2023
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24183
          Issue ID: 24183
           Summary: getSymbolsByUDA does no longer works on templatized
                    functions
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com
The following code
```d
struct operator
{
    string op;
}
@operator("∪") auto un(T,U)(T t, U u)
{
}
string translate(string s)
{
    import std.traits;
    alias funcs = getSymbolsByUDA!(mixin(__MODULE__), operator);
    static assert (funcs.length == 1);
    return "";
}
void main()
{
    mixin(" 1 ∪ 2 ".translate());
} 
```
used to work but now compilation fails with:
> /tmp/temp_7FBF1B293B70.d:14:5: Error: static assert:  `0LU == 1LU` is false
--
    
    
More information about the Digitalmars-d-bugs
mailing list