https://issues.dlang.org/show_bug.cgi?id=14964
Issue ID: 14964
Summary: __traits(isAlias, foo)
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Currently, there doesn't appear any way to distinguish traits tested on an
alias and the symbol it aliases.
```
module funcs;
alias FuncPtr = void function();
@ChooseMe FuncPtr funcPtr;
alias anotherName = funcPtr;
module foo;
foreach(sym; __traits(getAllMembers, funcs))
// Call hasUDA, isFunctionPtr, etc...
```
Here, I want to single out funcPtr, but it's impossible as any test that is
true for funcPtr is also true for anotherName. An isAlias trait would be quite
helpful for this situation.
--