https://issues.dlang.org/show_bug.cgi?id=15912

          Issue ID: 15912
           Summary: Anonymous class with missing method results in linker
                    error
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

This code successfully compiles, but fails to link:

    abstract class A {
        void x();
    }

    void main() {
        new class A {};
    }

The error is:

    app.o:(.data._D3app4mainFZ13__anonclass516__vtblZ+0x28): undefined
reference to `_D3app1A1xMFZv'

The error message doesn't mention what causes the error, so it would be nice to
detect these problems at compile-time.

This might be related to issue 13438.

--

Reply via email to