[Issue 9405] New: __traits(parent) returns current module as imported package parent
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 26 08:47:44 PST 2013
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: nobody at puremagic.com
ReportedBy: m.strashun at gmail.com
--- Comment #0 from Dicebot <m.strashun at 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 at microfog:~/Documents/devel/playground$ dmd -o- -unittest -version=1 test.d
module test
module test
mist at 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: -------
More information about the Digitalmars-d-bugs
mailing list