http://d.puremagic.com/issues/show_bug.cgi?id=8560

           Summary: Strange behavior of lambda expressions
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: iu.biryu...@gmail.com


--- Comment #0 from ilya <iu.biryu...@gmail.com> 2012-08-18 13:45:45 PDT ---
I came up with this code while playing around with D:

import std.stdio;

public class Test(alias fun, alias fun2) {
  void doIt() {
    fun();
    fun2();
  }
}


void main() {
  (new Test!(
      () => {writeln("fun1");},
      () => writeln("fun2")
    )
  ).doIt();
}

After compiling this code I expect to see the following output(or compiler
error, if I'm misusing lambda syntax):
fun1
fun2

Insted I get:
fun2

DMD64 D Compiler v2.060

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to