[Issue 5394] Changing the order of writing pragma(msg, (...).mangleof) changes the result
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 1 07:27:11 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5394
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2012-06-01 07:29:04 PDT ---
This is not a bug. Test with following code.
private template Dummy(sth...) { struct Hook { } }
template myMangledName(sth...) if (sth.length == 1)
{
enum string myMangledName = Dummy!(sth[0]).Hook.mangleof;
version(A)
{
pragma(msg, "1[", Dummy!().Hook.mangleof, "]");
pragma(msg, "2[", Dummy!(sth).Hook.mangleof, "]");
}
version(B)
{
pragma(msg, "2[", Dummy!(sth).Hook.mangleof, "]");
pragma(msg, "1[", Dummy!().Hook.mangleof, "]");
}
}
class Temp
{
int Field;
pragma(msg, "IGNORE THIS... ", myMangledName!(Field));
}
output:
c:\d> dmd -version=A -run test.d
IGNORE THIS... 1[S4test10__T5DummyZ4Hook]
2[S4test4Temp32__T5DummyS19_D4test4Temp5FieldiZ4Hook]
S4test4Temp32__T5DummyS19_D4test4Temp5FieldiZ4Hook
c:\d> dmd -version=B -run test.d
IGNORE THIS... 2[S4test4Temp32__T5DummyS19_D4test4Temp5FieldiZ4Hook]
1[S4test10__T5DummyZ4Hook]
S4test4Temp32__T5DummyS19_D4test4Temp5FieldiZ4Hook
--
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