www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6485] New: interface + abstract class fails on linking

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6485

           Summary: interface + abstract class fails on linking
           Product: D
           Version: D2
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: soywiz gmail.com



14:47:24 PDT ---
If you have to mark the method as abstract, it should produce an error while
compiling, not on linking. I had to figure out the problem because I didn't get
any error when compiling. On big projects have descriptive errors is a must.

//version = WORKS;

interface I {
    void test();
}

abstract class A : I {
    version (WORKS) {
        // Works
        abstract void test();
    } else {
        // Error 42: Symbol Undefined _D2aa1A4testMFZv
        void test();
    }
}

class B : A {
    void test() {
    }
}

int main(string[] args) {
    return 0;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 12 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6485


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |INVALID



07:57:22 PST ---
A.test can be defined externally in another object file, that's why it's a
linker error.

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