What is going on with UFCS and foreach?

foreach(i;0..5).writeln;

This prints five line breaks.

foreach(i;0..5).i.writeln;

This will not compile.

foreach(i;0..5).writeln(i);

This writes out 1 to 4 on separate lines. Is this supposed to work? I thought a.b would be rewritten to b(a) with UFCS but writeln(foreach(i;0..5)) is nonsensical and does not compile and should be the same as foreach(i;0..5).writeln;

Reply via email to