http://d.puremagic.com/issues/show_bug.cgi?id=9405
Summary: __traits(parent) returns current module as imported package parent Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: m.stras...@gmail.com --- Comment #0 from Dicebot <m.stras...@gmail.com> 2013-01-26 08:47:43 PST --- version(1) { import std.traits; import core.sync.barrier; } void main() { version(2) { import std.traits; import core.sync.barrier; } pragma(msg, __traits(parent, std)); pragma(msg, __traits(parent, core)); } -------------------------------------- mist@microfog:~/Documents/devel/playground$ dmd -o- -unittest -version=1 test.d module test module test mist@microfog:~/Documents/devel/playground$ dmd -o- -unittest -version=2 test.d test.d(14): Error: argument std has no parent false test.d(15): Error: argument core has no parent false -------------------------------------- I am not 100% sure it is a bug, but difference in behavior between global and scoped import + silence in docs on this matter makes me think so. This is a reason std.traits unittest fail to me when I invoke them directly via: dmd -o- -unittest std/traits.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------