Summary: abstract classes sometimes allow non-abstract bodyless
           Product: D
           Version: 1.043
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD

This compiles and links

abstract class C { void foo(); }
void main() {}

while this doesn't

interface I { void foo(); }
abstract class C : I { void foo(); }
void main() {}

with an undefined reference to `_D7abstfun1C3fooMFZv'.

Since methods in abstract classes may have bodies and being allowed to
implement a member function elsewhere than the class definition is a goal (see
resolution of bug 1289), the first case should also require a definition for
foo. This is also what I would expect from reading the spec on abstract
functions and classes.


Reply via email to