www.digitalmars.com         C & C++   DMDScript  
Archives

D Programming
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger
D.gnu
D

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics


digitalmars.D.bugs - [Issue 3733] New: call overloaded method by shared

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

           Summary: call overloaded method by shared
           Product: D
           Version: 2.039
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: d_lang ku6.jp


--- Comment #0 from Takuya Kurosawa <d_lang ku6.jp> 2010-01-22 02:44:08 PST ---
Sample code:
--------
class SampleClass
{
    void foo() {}

    shared
    void foo() {}

    void bar()
    {
        foo();
    }
}
--------

Result with dmd 2.039:
--------
test.d(10): Error: function test.SampleClass.foo called with argument types:
        (())
matches both:
        test.SampleClass.foo()
and:
        test.SampleClass.foo()
--------

I think that no shared 'foo' method should be called in 'bar' method.


If 'foo' method is called from 'this' pointer explicitly, dmd compile
successfully.
--------
void bar()
{
    this.foo();
}
--------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2010