Bug 23776 – getSymbolsByUDA fails to fetch symbols from module

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-03-13T03:06:06Z
Last change time
2023-03-16T08:07:47Z
Keywords
pull
Assigned to
No Owner
Creator
hsteoh

Comments

Comment #0 by hsteoh — 2023-03-13T03:06:06Z
Code: -------mod.d-------- struct Tag {} @Tag struct MyStructA {} @Tag struct MyStructB {} @Tag struct MyStructC {} -------------------- -------test.d------- import std.traits : getSymbolsByUDA; import mod; alias components = getSymbolsByUDA!(mod, Tag); static assert(components.length > 0); -------------------- Compile command: dmd -main -i test.d Expected behaviour: assert shouldn't trigger, getSymbolsByUDA should return a list with MyStructA, MyStructB, and MyStructC. Git bisect shows that the offending commit is: e305dc9f79cc98579257f588308bb2322fd843df Searching bugzilla reveals a similar issue #20054, but apparently the fix applied there does not cover the above case, as both dmd git master (9d2d21f48762) and LDC 1.32.0 exhibit this problem.
Comment #1 by dlang-bot — 2023-03-13T13:04:40Z
@RazvanN7 created dlang/phobos pull request #8716 "Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module" fixing this issue: - Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module https://github.com/dlang/phobos/pull/8716
Comment #2 by dlang-bot — 2023-03-15T01:48:16Z
dlang/phobos pull request #8716 "Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module" was merged into stable: - e47d32edc95b2fade9659f4dd366cba449791114 by RazvanN7: Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module https://github.com/dlang/phobos/pull/8716
Comment #3 by dlang-bot — 2023-03-16T08:07:47Z
dlang/phobos pull request #8720 "merge stable" was merged into master: - 67a47cf39d52b3cb3ae4117c0237415e03737f8a by RazvanN7: Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module https://github.com/dlang/phobos/pull/8720