Skip to content

Commit

Permalink
Polish printer (and remove an @ETF annotation)
Browse files Browse the repository at this point in the history
Fixes: #297
  • Loading branch information
knutwannheden committed Sep 11, 2023
1 parent 65dfd26 commit 8a5a0d5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,7 @@ private void visitArgumentsContainer(JContainer<Expression> argContainer, Space.
break;
}

if (i > 0 && omitParensOnMethod && (
!args.get(0).getElement().getMarkers().findFirst(OmitParentheses.class).isPresent() &&
!args.get(0).getElement().getMarkers().findFirst(OmitParentheses.class).isPresent())) {
if (i > 0 && omitParensOnMethod && !args.get(0).getElement().getMarkers().findFirst(OmitParentheses.class).isPresent()) {
p.append(indexedAccess ? ']' : ')');
} else if (i > 0) {
p.append(',');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,6 @@ operator fun get(x: Int, y: Int) = 2 * x + 4 * y - 10

@Test
@Issue("https://github.com/openrewrite/rewrite-kotlin/issues/297")
@ExpectedToFail
void spaceAfterLambdaParameter() {
rewriteRun(
kotlin(
Expand Down

0 comments on commit 8a5a0d5

Please sign in to comment.