[Issue 4401] New: auto functions cannot be inner functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 28 07:07:12 PDT 2010


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

           Summary: auto functions cannot be inner functions
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: philippe.sigaud at gmail.com


--- Comment #0 from Philippe Sigaud <philippe.sigaud at gmail.com> 2010-06-28 16:07:11 CEST ---
It seems auto function cannot be inner functions:

void foo()
{
    string bar(string s) { return s;} // works
    auto   baz(string s) { return s;} // error!
}

Errors:

main.d|13|found 's' when expecting ')'|
main.d|13|semicolon expected, not ')'|
main.d|13|found ')' instead of statement|

Reading the docs, nothing tells me auto functions cannot be used as inner
function. So either it's a bug or you should update the docs.

-- 
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