Summary: access violation when passing a function literal to
                    the mixin and calling it from function that has other
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD

--- Comment #0 from luka8088 <> 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
    // in order to make this work either remove one int declaration or remove
fn call
    int c;
    int d;


class a {
  mixin tpl1!(function () { writeln("test"); });

void main () {
  a a1 = new a();

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to