[Issue 7713] New: lambda inference doesn't work on template function argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 15 01:58:10 PDT 2012


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

           Summary: lambda inference doesn't work on template function
                    argument
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-03-15 01:58:13 PDT ---
test case:
----
void foo(T)(T delegate(in Object) dlg)
{}
void main()
{
    foo( (in obj) { return 15; } );   // line 6
}

output:
----
test.d(6): Error: template test.foo(T) does not match any function template
declaration
test.d(6): Error: template test.foo(T) 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: -------


More information about the Digitalmars-d-bugs mailing list