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