intellij-community
intellij-community copied to clipboard
KTIJ-103: Trailing comma breaks formatting of 'when' expression
Also I don't quite sure how the code should be formatted in the case when we have line break after arrow. Like this?
when(x) {
1
->
{
println(1)
}
}
UPD: Found that line break between -> and { will be removed after reformat
@osipxd Hi! Are you going to continue work on this PR? I'd like to fix this issue
@IlyaGulya, sure, feel free to work on it! I've rebased the branch onto the fresh master and fixed review comments. If you want to continue work in this branch, let me know and I'll give you access to the fork.
@dimonchik0036
Hi! I've just pushed fixes for this issue.
Also, I've added separate test WhenEntryArrow which checks that formatter correctly behaves on caret moving to next line by Enter action.
Please take a look and tell if everything is ok.
@dimonchik0036 Hi! Please, take a look on this PR, or, at least, ping someone who is responsible for it now.
@vladimirdolzhenko Hi! Can you please also take a look on this PR? 🙂
@dimonchik0036 @vladimirdolzhenko Gentle reminder about this PR 🙂 I've rebased on latest master
@aleksandrina-streltsova thanks!