www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16001] New: Lambda syntax: forbid use with


          Issue ID: 16001
           Summary: Lambda syntax: forbid use with FunctionLiteralBody:
                    (x) => {assert(x);}
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: sigod.mail gmail.com

As discussed here:
https://forum.dlang.org/post/thgyqyarccinzuqhcjtf forum.dlang.org

It's very common for people from other languages to write something like

    list.each!(x => { /* use x */ });

Which, of course, doesn't work as expected.

May 07 2016