Fix InterfaceProxy when used with class instances.
This commit is contained in:
parent
d7b2173cb3
commit
3d1175e821
|
@ -131,7 +131,9 @@ struct InterfaceProxy(I) if (is(I == interface)) {
|
|||
import std.conv : emplace;
|
||||
clear();
|
||||
m_intf = ProxyImpl!O.get();
|
||||
emplace!O(m_value[0 .. O.sizeof]);
|
||||
if (is(O == class))
|
||||
(cast(O[])m_value[0 .. O.sizeof])[0] = object;
|
||||
else emplace!O(m_value[0 .. O.sizeof]);
|
||||
(cast(O[])m_value[0 .. O.sizeof])[0] = object;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue