formatter fix on properties

This commit is contained in:
sergeych committed 2026-01-06 12:00:04 +01:00
1 parent 555c9b94de
commit 72bb6ae67b
2 files changed
+59 -4

No files matched your search

@@ -859,4 +859,31 @@ class LyngFormatterTest {
""".trimIndent()
assertEquals(expected2, LyngFormatter.reindent(src2, LyngFormatConfig(indentSize = 4)))
}
@Test
fun mixedPropertyAccessors() {
val src = """
class X {
var x get() {
11
}
set(value) {
}
}
""".trimIndent()
val expected = """
class X {
var x get() {
11
}
set(value) {
}
}
""".trimIndent()
val cfg = LyngFormatConfig(indentSize = 4, continuationIndentSize = 4)
val out = LyngFormatter.reindent(src, cfg)
assertEquals(expected, out)
}
}