Closed welopino closed 7 years ago
I can’t reproduce this – can you please post your original code before formatting?
To clarify: if you take your result of formatting, and format it again, it will still be broken – but that’s not a bug: it’s only a bug if the formatter takes valid code and breaks it. To fix that, or even know if that’s the case, I need the original, unformatted code.
Also, are you sure you used ceylon.formatter
and not the IntelliJ IDE’s formatter?
@welopino if you can’t provide steps to reproduce this, I’ll have to close this issue. ceylon.formatter
should handle this situation correctly (I remember implementing it – not fun :D ), and I suspect you may have been using IntelliJ’s formatter (which is separate and, as far as I know, less sophisticated).
The whitespace before opening "(" causes problems. I use the standard configuration of the formatter of ceylon 1.3.2.: The result of formatting looks like that:
The compiler knows it better than the formatter: