> Because compiler doesn't treat it as a separate value, instead checks type > compatibility for the whole l-> value and r-value, i.e. of the type of the > variable (result) and the type of the value you assign to it, two > tuples.
I understand that the compiler is doing the conversion in one case and not the other. That's obvious. What I question is whether it should be. If one can assign 0 to an int8 variable, then I would argue that one should be able to assign (0,"foo") to a (int8, string) variable. > For me it doesn't work with 0.18 either I just checked and you are right. The only thing that I can think of is that I have not been using Nim for the project I am working on and have only experimented with it sporadically. I may have changed the routine in question and then, without compiling it, went off to something else. While that's not consistent with how I usually work, it's the only explanation I can think of, because I know for certain that _a_ version of that file did compile with 0.18. I _thought_ it was this version, but apparently not. In any case, my mistake.
