Bug 18555 – getSymbolsByUDA has strange behaviour on modules

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2018-03-05T04:10:35Z
Last change time
2018-03-19T18:09:55Z
Assigned to
No Owner
Creator
elpenguino+D

Comments

Comment #0 by elpenguino+D — 2018-03-05T04:10:35Z
import std.traits; enum Something; @Something void foo() {} @Something 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.
Comment #1 by spoov0.707 — 2018-03-17T20:33:53Z
Comment #2 by spoov0.707 — 2018-03-19T18:09:55Z
*** This issue has been marked as a duplicate of issue 18624 ***