www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8731] New: Compiler allows multiple implementations of the same function signature

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

           Summary: Compiler allows multiple implementations of the same
                    function signature
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: schveiguy yahoo.com



04:49:01 PDT ---
Example:

testme2.d:
module testme2;
import std.stdio;

void foo()
{
    writeln("first");
}

void foo()
{
    writeln("second");
}


testme2.di:
module testme2;

void foo();

testme.d:
import testme2;

void main()
{
    foo();
}


Compiled like this:




first


Clearly, there should be an error somewhere in here.  Listing the asm of
testme2.o shows two of the exact same symbol.

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