Skip to content

Commit

Permalink
Add failing test for #571
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Jan 22, 2024
1 parent bca9284 commit d011dde
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/java/org/openrewrite/kotlin/tree/FunctionTypeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ fun foo() : suspend ( param : Int ) -> Unit = { }
}

@ExpectedToFail
@Test
@Issue("https://github.com/openrewrite/rewrite-kotlin/issues/553")
void trailingAnnotation() {
rewriteRun(
kotlin(
Expand All @@ -145,4 +147,20 @@ abstract class Test : suspend @Anno ( ) -> String
)
);
}

@ExpectedToFail
@Test
@Issue("https://github.com/openrewrite/rewrite-kotlin/issues/571")
void suspendBeforeParenthesized() {
rewriteRun(
kotlin(
"""
class SomeReceiver
suspend inline fun SomeReceiver . method(
crossinline body : suspend ( SomeReceiver . () -> Unit )
) {}
"""
)
);
}
}

0 comments on commit d011dde

Please sign in to comment.