[Issue 17441] std.traits.moduleName gives wrong answer for modules imported under a different name in a mixin
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 10 14:09:04 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=17441
berni44 <bugzilla at d-ecke.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at d-ecke.de
Hardware|x86_64 |All
OS|Linux |All
--- Comment #1 from berni44 <bugzilla at d-ecke.de> ---
Mixin seems not to matter. Simplified testcase (foo/bar/package.d and
foo/bar/baz.d like above):
void main()
{
import std.traits : moduleName;
import mod0 = foo.bar.baz;
import mod1 = foo.bar;
assert(moduleName!mod0 == "foo.bar.baz");
assert(moduleName!mod1 == "foo.bar"); // fails with foo.bar.bar
}
--
More information about the Digitalmars-d-bugs
mailing list