[Issue 13396] New: Non-instance and final methods on extern(C++) interfaces shouldn't be mangled as C++ names
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Aug 28 18:33:02 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13396
Issue ID: 13396
Summary: Non-instance and final methods on extern(C++)
interfaces shouldn't be mangled as C++ names
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: blah38621 at gmail.com
A while back, some changes were made to the C++ mangling, those changes broke
the build on an old project of mine which declared the following:
extern(C++) public interface ScriptObject // Total size: 0x3C
{
public:
final static T Find(T)(string name) { return T.init; }
}
and, in another file, it does:
ScriptObject.Find!SomeObjectType("SomeObjectType");
This instantiates the template, and the current DMD tries to mangle Find as a
C++ function, which obviously fails, because string isn't something you can
mangle for C++.
I believe that methods with implementations in extern(C++) interfaces should
still be using the D calling convention and mangling scheme.
--
More information about the Digitalmars-d-bugs
mailing list