https://kotlinlang.org logo
l

Lamberto Basti

01/19/2023, 12:16 PM
Actually:
Copy code
fun CodeBlock.Builder.endControlFlow(format: String, vararg args: Any) = apply {
    unindent()
    add("}$format\n", args)
}
works 🙂 I thought the iner functions of
endControlFlow
where private, but turns out it is just an
add("}\n")