www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4074] New: function overloading fails

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

           Summary: function overloading fails
           Product: D
           Version: 1.057
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: digited yandex.ru


--- Comment #0 from Eugene Zheleznikoff <digited yandex.ru> 2010-04-08 06:42:39
PDT ---
Created an attachment (id=605)
archive with source code

module common;

class A {}
class B {}

//--------------------------

module import1;

import common;

void foo(B b) {}

//--------------------------

module import2;

import common;

void foo(A a) {}

//--------------------------

module test;

import common, import1, import2;

void main()
{
    auto b = new B;
    foo(b);
}

//--------------------------

dmd test.d common.d import1.d import2.d
test.d(8): Error: import1.foo at import1.d(5) conflicts with import2.foo at import2.d(5) reproduced on WinXP with DMD 1.051 and 1.057 workaround: module test; import common; import import1 : fooo = foo; import import2 : fooo = foo; void main() { auto b = new B; fooo(b); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 08 2010