[Issue 11595] __traits(allMembers, packageName) behaves oddly.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Nov 28 09:54:31 PST 2015
https://issues.dlang.org/show_bug.cgi?id=11595
blm768 at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |blm768 at gmail.com
--- Comment #2 from blm768 at gmail.com ---
A more minimal test case:
---
module main;
import core.thread;
//Broken:
pragma(msg, __traits(allMembers, core));
//Seems to work:
pragma(msg, __traits(allMembers, core.thread));
void main() {}
---
The interesting thing is that the issue only seems to surface for root
packages. In the backend source, when working with __traits (see traits.d),
most package symbols have been resolved to Package objects, but root package
names haven't been fully resolved; they're still Import objects. That's
probably related to this issue.
--
More information about the Digitalmars-d-bugs
mailing list