Thread overview
[Issue 13396] Non-instance and final methods on extern(C++) interfaces shouldn't be mangled as C++ names
Aug 30, 2014
yebblies
Aug 30, 2014
Orvid King
Aug 30, 2014
yebblies
Aug 30, 2014
yebblies
Aug 30, 2014
Orvid King
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13396

yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies@gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from yebblies <yebblies@gmail.com> ---
That would make it impossible to match C++ methods that were inside the class the interface is matching.  I think it would be worse to be inconsistent here.

The workaround is quite simple - mark those methods with extern(D).

I'm marking as invalid as the change was intentional, and the previous acceptance of those methods in a C++ interface was a bug, as far as I know.

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13396

Orvid King <blah38621@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blah38621@gmail.com

--- Comment #2 from Orvid King <blah38621@gmail.com> ---
If a body is defined on the D side though, what is there to match on the C++ side?

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13396

--- Comment #3 from yebblies <yebblies@gmail.com> ---
(In reply to Orvid King from comment #2)
> If a body is defined on the D side though, what is there to match on the C++ side?

The C++ code could be calling the D body.

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13396

--- Comment #4 from yebblies <yebblies@gmail.com> ---
(In reply to yebblies from comment #3)
> (In reply to Orvid King from comment #2)
> > If a body is defined on the D side though, what is there to match on the C++ side?
> 
> The C++ code could be calling the D body.

At least, I think that works.  But either way all the functions inside the interface should be extern(C++).

--
August 30, 2014
https://issues.dlang.org/show_bug.cgi?id=13396

--- Comment #5 from Orvid King <blah38621@gmail.com> ---
Alright, that makes sense, I hadn't thought about C++ -> D.

--