Skip to content

Switch Function Body Expression Style

Switches between expression style and block body style functions if possible.

Example

position of the caret is unimportant.

Before

fun test(): Int {
    return readln().toInt() + 546
}

Before

fun test() = readln().toInt() + 546