May 04, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8029

           Summary: Untyped delegate literal and template issue
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: johnch_atms@hotmail.com


--- Comment #0 from johnch_atms@hotmail.com 2012-05-04 02:14:01 PDT ---
The compiler doesn't seem to be able to infer the type for a delegate literal which is used as an argument to a function template inside a class template.

struct Test(T) {
  void run(U)(U delegate(T) dg) {}
}

void main() {
  Test!string test;
  test.run((p) { return 12; });
  // test.run(p => 12); // This also fails
}


error : undefined identifier T, did you mean template to(T)?
error : template Test!(string).Test.run does not match any function template
declaration
error : template Test!(string).Test.run(U) cannot deduce template function from
argument types !()(void)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 23, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8029


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-04-23 01:13:11 PDT ---
*** This issue has been marked as a duplicate of issue 9393 ***

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