[D] Fix occasional undefined behaviour with inheritance hierarchies
Particularly when using virtual inheritance as the pointers weren't correctly upcast from derived class to base class when stored in the base's proxy class. Fixes commented out test code in cpp11_std_unique_ptr_runme and li_std_auto_ptr_runme D tests.
This commit is contained in:
parent
5a379d317b
commit
910fd1e3cf
8 changed files with 73 additions and 12 deletions
|
|
@ -3402,7 +3402,7 @@ private:
|
|||
} else {
|
||||
Printv(upcasts_code,
|
||||
"SWIGEXPORT ", baseclassname, " * ", upcast_wrapper_name,
|
||||
"(", baseclassname, " *objectRef) {\n",
|
||||
"(", classname, " *objectRef) {\n",
|
||||
" return (", baseclassname, " *)objectRef;\n"
|
||||
"}\n",
|
||||
"\n", NIL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue