Bug 17293 – "Using C++ Classes From D" example no longer works
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-04-02T16:27:57Z
Last change time
2017-08-14T23:55:40Z
Assigned to
No Owner
Creator
Roman
Comments
Comment #0 by freeslave93 — 2017-04-02T16:27:57Z
"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.