www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15499] New: IFTI fails with function literal alias

https://issues.dlang.org/show_bug.cgi?id=15499

          Issue ID: 15499
           Summary: IFTI fails with function literal alias
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: wyrlon gmx.net

alias add1(T1,T2) = (T1 a, T2 b)       => a+b;
int   add2(T1,T2)   (T1 a, T2 b) { return a+b; }

void main()
{
  import std.stdio;
  add1(1,1).writeln; // cannot deduce function from argument types !()(int,
int)
  add2(1,1).writeln; // OK
}

--
Jan 02