http://d.puremagic.com/issues/show_bug.cgi?id=6600
Summary: unrelated expression alters function name mangling Product: D Version: D2 Platform: Other OS/Version: FreeBSD Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@dawgfoto.de --- Comment #0 from d...@dawgfoto.de 2011-09-03 14:31:52 PDT --- void funOneArg()() {} void func_pure_nothrow() pure nothrow {} void foo() { // commenting the next line in/out will change the mangling of *f2 // enum f1 = &curry!funOneArg; enum f2 = &func_pure_nothrow; pragma(msg, typeof(*f2)); pragma(msg, typeof(*f2).mangleof); } auto curry(alias fun, Args...)(Args args) { return fun(args); } --- Roughly the issue is that the deco member for TypeFunction isn't updated when purityLevel is deduced lazily. In detail: TypePointer for f1 and f2 are merged as their types are already equal when evaluating the AddrExp. Now both TypePointer alias the same TypeFunction but that was created from a function without 'pure nothrow'. That's why the deco buffer does still contain unattributed function. There is also the side issue that f2's TypeFunction suddenly has an empty tuple parameter. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------