Summary: Improve nested functions
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: spec
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-03-29 14:16:04 PDT ---
I've run into two issues with nested functions that I think should be fixed. As
is, it seems that the nested functions are scarcely more than syntax sugar for

1. Overloading:

void main()
    void test() {}
    void test(int a) {}

No good reason why that shouldn't work. This is described in the spec, but no
good reason is given.

2. Reusing same function name in different scopes:

void main()
    { void test() {} }
    { void test() {} }

This won't compile either. This limitation isn't even described in the spec as
far as I can tell.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to