On Monday, 28 November 2016 at 11:30:23 UTC, rikki cattermole wrote:
In your case I'd just swap out ``MyClass[] someArray;`` to ``Object[] someArray;``. But only because there are no members added without the extra typing in MyClass.

Remember types in meta-programming in D are not erased, they exist in the assembly and are unique. Unlike Java who did the implementation rather wrong.

I'm tried to use Object[], but got error
Error: no property 'value' for type 'object.Object'
I guess I must cast() to MyClassInt or MyClassFloat, but how can I do it?

Reply via email to