Bug 11464 – Abstract classes can be instantiated. Causes link errors.

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-07T02:43:00Z
Last change time
2013-11-14T23:23:57Z
Assigned to
nobody
Creator
rjmcguire

Comments

Comment #0 by rjmcguire — 2013-11-07T02:43:59Z
Tested on linux 64 with dmd 2063.2 and 2064 Simple test case: abstract class A { void put(int); int popFront(); } class B : A { } void main() { B b = new B(); } Outputs: $ dmd abstract_test.d abstract_test.o:(.rodata+0xa8): undefined reference to `_D13abstract_test1A3putMFiZv' abstract_test.o:(.rodata+0xb0): undefined reference to `_D13abstract_test1A8popFrontMFZi' collect2: error: ld returned 1 exit status --- errorlevel 1
Comment #1 by yebblies — 2013-11-14T23:23:57Z
*** This issue has been marked as a duplicate of issue 5129 ***