[Issue 6266] New: Mac OSX linker fails to recognize private method of interface

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 7 13:25:24 PDT 2011


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

           Summary: Mac OSX linker fails to recognize private method of
                    interface
           Product: D
           Version: unspecified
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: blazej.podsiadlo at gmail.com


--- Comment #0 from Blazej Podsiadlo <blazej.podsiadlo at gmail.com> 2011-07-07 13:20:14 PDT ---
Hi,
Linker fails to process following code when interface methods are private:
The same code with protected/public methods works fine...
-----------------------------
import std.stdio;

interface Foo {
  private void foo();

    public final void doFooFoo() {
        foo();
        foo();
    };

};

class MyFoo : Foo {
  override private void foo() {
        writeln("foo()");
    }
};

void main(string[] args) {
    MyFoo mf = new MyFoo;
    mf.doFooFoo();
    writeln("Done.");
}
---------------------------
Undefined symbols for architecture i386:
  "_D4stat3Foo3fooMFZv", referenced from:
      _D4stat3Foo8doFooFooMFZv in stat.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
--- errorlevel 1

Best Regards,
Blazej

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