From d011dde6d0c886149f185c9d65dc07c955778cbc Mon Sep 17 00:00:00 2001 From: Knut Wannheden Date: Mon, 22 Jan 2024 17:57:57 +0100 Subject: [PATCH] Add failing test for #571 --- .../kotlin/tree/FunctionTypeTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/test/java/org/openrewrite/kotlin/tree/FunctionTypeTest.java b/src/test/java/org/openrewrite/kotlin/tree/FunctionTypeTest.java index dab8c8180..8eaf02605 100644 --- a/src/test/java/org/openrewrite/kotlin/tree/FunctionTypeTest.java +++ b/src/test/java/org/openrewrite/kotlin/tree/FunctionTypeTest.java @@ -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( @@ -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 ) + ) {} + """ + ) + ); + } }