Page MenuHomePhabricator

mono: automatic type conversion does not work inside tuples
Open, NormalPublic

Description

We have a type called Efl.Gfx.Align which is just a thin wrapper around double, which provides automatic conversions.
Therefore, things like obj.SetAlign(0.5, 0.5) worked, because the 0.5 is silently converted to Efl.Gfx.Align.
But setters are now private so the new syntax involves tuples: obj.Align = (0.5, 0.5).
This, unfortunately, produces errors:

Tuple literal `(double, double)' cannot be converted to type `(Efl.Gfx.Align, Efl.Gfx.Align)'

Besides casting each double to Efl.Gfx.Align (obj.SetAlign((Efl.Gfx.Align)0.5, (Efl.Gfx.Align)0.5) which is ugly, but this is what it's currently done in the examples), is there any other solution?

segfaultxavi triaged this task as Normal priority.