Thread overview
[Issue 5045] New: auto type inference for nest function
Oct 17, 2010
galaxylang
Jul 30, 2011
klickverbot
October 12, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5045

           Summary: auto type inference for nest function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2010-10-11 18:13:29 PDT ---
Maybe this is a duplicated error report, but I haven't found it.

Current dmd 2.049 doesn't support nested functions with "auto" return value:

void main() {
    auto foo() {
        return 1;
    }
}


DMD shows:
test.d(2): no identifier for declarator foo
test.d(2): semicolon expected, not '{'


But this is an useful feature to have because "auto" is becoming increasingly important as lazy Ranges often have a very complex type.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 17, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5045


galaxylang <galaxylang@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |galaxylang@gmail.com


--- Comment #1 from galaxylang <galaxylang@gmail.com> 2010-10-16 22:56:02 PDT ---
i found it too,^-^

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 26, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5045



--- Comment #2 from bearophile_hugs@eml.cc 2011-06-26 05:10:19 PDT ---
In DMD 2.053 the error messages are:

test.d(2): function declaration without return type. (Note that constructors
are always named 'this')
test.d(2): no identifier for declarator foo()

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 30, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5045


klickverbot <code@klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |code@klickverbot.at
         Resolution|                            |DUPLICATE


--- Comment #3 from klickverbot <code@klickverbot.at> 2011-07-30 15:35:55 PDT ---
*** This issue has been marked as a duplicate of issue 4401 ***

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