www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3492] New: Can't overload nested functions

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

           Summary: Can't overload nested functions
           Product: D
           Version: 2.036
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dsimcha yahoo.com


--- Comment #0 from David Simcha <dsimcha yahoo.com> 2009-11-09 20:35:03 PST ---
Nested functions don't overload like non-nested functions.  If this behavior is
correct, it seems like a fairly arbitrary limitation, but it should be
clarified in the spec.

void main() {
    static void foo(uint a, float b) {}
    static void foo(float a, uint b) {}
}

Error: declaration foo is already defined

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