On Friday, 12 March 2021 at 17:57:06 UTC, David Zhang wrote:
On Friday, 12 March 2021 at 17:46:22 UTC, Imperatorn wrote:
On Friday, 12 March 2021 at 17:37:43 UTC, David Zhang wrote:
[...]
Have you tried using Variant or jsvar
(https://code.dlang.org/packages/arsd-official%3Ajsvar)? 🤔
It doesn't appear to support interfaces, see opAssign at line
682.
It occurs to me that I.sizeof == 8 which is just enough for the
vtbl, but not enough for an implementation ptr. Maybe it's a
pointer to a {self, vtbl} pair? SomeClass.sizeof == 16, which
is enough storage for both...
Did you try Variant? Seems to work for me