www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3431] New: Automatic deduction of anonymous delegate signatures


           Summary: Automatic deduction of anonymous delegate signatures
           Product: D
           Version: 2.034
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: pelle.mansson gmail.com

--- Comment #0 from Pelle Månsson <pelle.mansson gmail.com> 2009-10-21 05:19:54
PDT ---
Anonymous delegates cannot use automatic type deduction. For example:

int f(int delegate(int) g) {
    return g(13);
void main() {
    f((auto x) { return x+13; });

This fails to compile. Omitting the 'auto' also fails to compile.

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