December 06, 2017
https://issues.dlang.org/show_bug.cgi?id=18037

          Issue ID: 18037
           Summary: template lambda cannot deduce function from argument
                    types
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: ali.akhtarzada@gmail.com

When you declare a template lambda:

immutable lambda(T) = (T n) => n * n;

and call it without an explicit type it errors with with:

lambda cannot deduce function from argument types !()(int)

auto x = lambda!int(2); // works
auto x = lambda(2); // not works

Is this a bug? - tired on dmd v2.077.1

--