[Issue 3733] New: call overloaded method by shared

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 22 02:44:09 PST 2010


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 at puremagic.com
        ReportedBy: d_lang at ku6.jp


--- Comment #0 from Takuya Kurosawa <d_lang at 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: -------


More information about the Digitalmars-d-bugs mailing list