[Issue 6485] New: interface + abstract class fails on linking

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 12 14:47:26 PDT 2011


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 at puremagic.com
        ReportedBy: soywiz at gmail.com


--- Comment #0 from Carlos Ballesteros Velasco <soywiz at gmail.com> 2011-08-12 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: -------


More information about the Digitalmars-d-bugs mailing list