http://d.puremagic.com/issues/show_bug.cgi?id=5394


Kenji Hara <k.hara...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Kenji Hara <k.hara...@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: -------

Reply via email to