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;
|
import std.conv : emplace;
|
||||||
clear();
|
clear();
|
||||||
m_intf = ProxyImpl!O.get();
|
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;
|
(cast(O[])m_value[0 .. O.sizeof])[0] = object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +165,7 @@ struct InterfaceProxy(I) if (is(I == interface)) {
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin(impl());
|
mixin(impl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue