Fix InterfaceProxy when used with class instances.
This commit is contained in:
parent
71c83440d3
commit
3a3eb73006
|
@ -81,6 +81,7 @@ struct InterfaceProxy(I) if (is(I == interface)) {
|
|||
static assert(O.sizeof <= m_value.length, "Object ("~O.stringof~") is too big to be stored in an InterfaceProxy.");
|
||||
import std.conv : emplace;
|
||||
m_intf = ProxyImpl!O.get();
|
||||
static if (is(O == struct))
|
||||
emplace!O(m_value[0 .. O.sizeof]);
|
||||
(cast(O[])m_value[0 .. O.sizeof])[0] = object;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue