Bug 9554 – Inconsistent stringof and mangleof result for module/package identifier
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-21T01:44:00Z
Last change time
2015-01-06T08:42:48Z
Keywords
pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-02-21T01:44:17Z
This test case should pass, but fails.
module test.mod;
alias pkg = test;
template Test(alias name) { enum Test = name; }
void fun() {}
// ("fun()"c == "void()"c) is false
static assert(fun.stringof == Test!(fun.stringof));
// ("_D4test3mod3funFZv"c == "FZv"c) is false
static assert(fun.mangleof == Test!(fun.mangleof));
// identifier 'stringof' of 'test.stringof' is not defined
static assert(test.stringof == Test!(test.stringof));
// identifier 'mangleof' of 'test.mangleof' is not defined
static assert(test.mangleof == Test!(test.mangleof));
// identifier 'stringof' of 'pkg.stringof' is not defined
static assert(pkg.stringof == Test!(pkg.stringof));
// identifier 'mangleof' of 'pkg.mangleof' is not defined
static assert(pkg.mangleof == Test!(pkg.mangleof));