www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11464] New: Abstract classes can be instantiated. Causes link errors.

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

           Summary: Abstract classes can be instantiated. Causes link
                    errors.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: rjmcguire gmail.com


--- Comment #0 from Rory <rjmcguire gmail.com> 2013-11-07 02:43:59 PST ---
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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 07 2013
parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11464


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE


--- Comment #1 from yebblies <yebblies gmail.com> 2013-11-15 18:23:57 EST ---
*** This issue has been marked as a duplicate of issue 5129 ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 14 2013