Check this: http://dpaste.dzfl.pl/ebbb3ebac60eIt doesn't give any error or warning. And writeln seems confused (do you see that "," at the end?)
I am sure the coder of writeln was lazy to prevent putting ", " after last item. You can report it as a bug I guess.