[Issue 5312] New: Function redefinition is allowed (duplicate functions)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 3 06:33:48 PST 2010


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

           Summary: Function redefinition is allowed (duplicate functions)
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bdom.pub+deebugz at gmail.com


--- Comment #0 from Bruno Medeiros <bdom.pub+deebugz at gmail.com> 2010-12-03 06:32:16 PST ---
The following compiles fine in terms of semantic analysis:

bool foo() { return false; }
bool foo() { return false; }

class X {

    bool foo() { return false; }
    bool foo() { return false; }

}


Rather we get two "Previous Definition Different" linker errors. But surely
this should be a compiler error, right? (at the semantic level)

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