http://d.puremagic.com/issues/show_bug.cgi?id=5394
Summary: Changing the order of writing pragma(msg, (...).mangleof) changes the result Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: wfunct...@hotmail.com --- Comment #0 from wfunct...@hotmail.com 2010-12-31 17:18:28 PST --- I have this code below: // Code ================================= private template Dummy(sth...) { struct Hook { } } template myMangledName(sth...) if (sth.length == 1) { enum string myMangledName = Dummy!(sth[0]).Hook.mangleof; pragma(msg, Dummy!().Hook.mangleof); pragma(msg, Dummy!(sth).Hook.mangleof); } class Temp { int Field; pragma(msg, "IGNORE THIS... ", myMangledName!(Field)); } // End Code ============================= When I compile it with DMD 2.051, I get this text printed: IGNORE THIS... S4meta10__T5DummyZ4Hook S4meta4Temp32__T5DummyS19_D4meta4Temp5FieldiZ4Hook S4meta4Temp32__T5DummyS19_D4meta4Temp5FieldiZ4Hook However, if I compile this: // Code ================================= private template Dummy(sth...) { struct Hook { } } template myMangledName(sth...) if (sth.length == 1) { enum string myMangledName = Dummy!(sth[0]).Hook.mangleof; pragma(msg, Dummy!(sth).Hook.mangleof); pragma(msg, Dummy!().Hook.mangleof); //Notice that the above two are switched } class Temp { int Field; pragma(msg, "IGNORE THIS... ", myMangledName!(Field)); } // End Code ============================= I get this result: IGNORE THIS... S4meta4Temp32__T5DummyS19_D4meta4Temp5FieldiZ4Hook S4meta10__T5DummyZ4Hook S4meta4Temp32__T5DummyS19_D4meta4Temp5FieldiZ4Hook which is obviously different from the last one. Is this a bug? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------