fix #55 newlines in function declarations and constructors

This commit is contained in:
sergeych committed 2025-08-20 11:07:49 +03:00
1 parent 0526cdfb38
commit 8d1cafae80
3 files changed
+31 -1

No files matched your search

+11
View File
@@ -106,4 +106,15 @@ class OOTest {
}
""".trimIndent())
}
@Test
fun testMultilineConstructor() = runTest {
eval("""
class Point(
x,
y
)
assertEquals(Point(1,2), Point(1,2) )
""".trimIndent())
}
}
@@ -3049,5 +3049,22 @@ class ScriptTest {
""".trimIndent())
}
@Test
fun testMultilineFnDeclaration() = runTest {
eval("""
fun test(
x = 1,
y = 2
) {
x * y
}
assertEquals( 10, test(5) )
assertEquals( 42, test(
6,
7
) )
""".trimIndent())
}
}