[Issue 15912] New: Anonymous class with missing method results in linker error
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Apr 10 18:43:24 PDT 2016
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: nobody at puremagic.com
Reporter: andy.pj.hanson at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list