Bug 18884 – getSymbolsByUDA fails on AliasSeq members
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-05-20T07:42:59Z
Last change time
2018-06-03T23:37:37Z
Assigned to
No Owner
Creator
elpenguino+D
Comments
Comment #0 by elpenguino+D — 2018-05-20T07:42:59Z
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 instantiating
onlineapp.d(9): instantiated from here: `getSymbolsByUDA!(X, X)`
--------
The flawed line appears to be here: `alias member = Alias!(__traits(getMember, symbol, names[0]));`
(In reply to Walter Bright from comment #2)
> This has been pulled. Has this issue been resolved?
Should be. The unittest in the PR is taken almost verbatim from here. Since it's a regression, it targets stable, and the bot only auto-closes issues when it makes its way to master, as I understand it.
Comment #4 by github-bugzilla — 2018-06-03T23:37:36Z