digitalmars.D.bugs - [Issue 6801] New: access violation when passing a function literal to the mixin and calling it from function that has other declarations
- d-bugmail puremagic.com (40/40) Oct 10 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6801
- d-bugmail puremagic.com (10/10) May 01 2012 http://d.puremagic.com/issues/show_bug.cgi?id=6801
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: nobody puremagic.com ReportedBy: luka8088 owave.net --- Comment #0 from luka8088 <luka8088 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: -------
Oct 10 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6801 SomeDude <lovelydear mailmetrash.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lovelydear mailmetrash.com --- Comment #1 from SomeDude <lovelydear mailmetrash.com> 2012-05-01 15:17:39 PDT --- Also fails with 2.059 Win32 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 01 2012