[Issue 23776] New: getSymbolsByUDA fails to fetch symbols from module
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 13 03:06:06 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23776
Issue ID: 23776
Summary: getSymbolsByUDA fails to fetch symbols from module
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: hsteoh at qfbox.info
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.
--
More information about the Digitalmars-d-bugs
mailing list