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

          Issue ID: 14536
           Summary: Calling destroy() on a on an extern(C++) class causes
                    a segfault
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: [email protected]
          Reporter: [email protected]

class Foo{}
extern(C++) class Bar{}

void main() {
    destroy(new Foo()); // Works fine
    destroy(new Bar()); // segfault!
}

Calling destroy() on a class marked extern(C++) will segfault. Either it should
work and not segfault, or trying to call destroy in this way should result in a
compile time error.

--

Reply via email to