http://d.puremagic.com/issues/show_bug.cgi?id=6801
Summary: access violation when passing a function literal to the mixin and calling it from function that has other declarations Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: luka8...@owave.net --- Comment #0 from luka8088 <luka8...@owave.net> 2011-10-10 03:01:58 PDT --- // this happens on Windows XP, 32bit, any version between dmd2-042 and dmd2-055 // there was also a feedback that linux dmd2-055 causes segfault // workaround for this is to use -O when compiling (both or windows and linux) import std.stdio; mixin template tpl1 (alias fn) { void b () { // calling fn causes Access Violation if there is two or more int declarations // in order to make this work either remove one int declaration or remove fn call int c; int d; fn(); } } class a { mixin tpl1!(function () { writeln("test"); }); } void main () { a a1 = new a(); a1.b(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------