jacob-carlborg/orange

Tuples failing

Aphexus opened this issue · 1 comments

I added some named tuples and orange gives errors related to it:

..\Libraries\Orange\serialization\Serializer.d-mixin-2017(2017): Error: expected 1 arguments for getAttributes but had 2
..\Libraries\Orange\serialization\Serializer.d-mixin-2017(2017): Error: expected 1 arguments for getAttributes but had 4
..\Libraries\Orange\serialization\Serializer.d-mixin-2017(2017): Error: expected 1 arguments for getAttributes but had 2
..\Libraries\Orange\serialization\Serializer.d-mixin-2017(2017): Error: expected 1 arguments for getAttributes but had 2
..\Libraries\Orange\serialization\Serializer.d-mixin-2017(2017): Error: expected 1 arguments for getAttributes but had 2
..\Libraries\Orange\serialization\Serializer.d(2030): Error: template instance orange.serialization.Serializer.Serializer.triggertUdaEvent!(onSerializing, inout(Tuple!(double, "w", double, "h"))) error instantiating
..\Libraries\Orange\serialization\Serializer.d(840): instantiated from here: triggerEvents!(inout(Tuple!(double, "w", double, "h")))
..\Libraries\Orange\serialization\Serializer.d(754): instantiated from here: serializeStruct!(inout(Tuple!(double, "w", double, "h")))
..\Libraries\Orange\serialization\Serializer.d(1026): instantiated from here: serializeInternal!(inout(Tuple!(double, "w", double, "h")))
..\Libraries\Orange\serialization\Serializer.d(1669): ... (5 instantiations, -v to show) ...

This can be "fixed" by wrapping a static if (!isTuple!T) is wrapped the attributes.

Do you have a test case?