[Issue 17293] New: "Using C++ Classes From D" example no longer works

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Apr 2 09:27:57 PDT 2017


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

          Issue ID: 17293
           Summary: "Using C++ Classes From D" example no longer works
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: freeslave93 at gmail.com

"Using C++ Classes From D" example from
https://dlang.org/spec/cpp_interface.html crashes if built this way:

g++ -c cpp.cpp
dmd cpp.o main.d -L-lstdc++

It also returns the wrong value for 'field'. Should be 5, but 0 is returned.
Replacing 'interface' with 'abstract class' fixes the problem.

--


More information about the Digitalmars-d-bugs mailing list