https://kotlinlang.org logo
#intellij
Title
# intellij
t

Tom Haywood

02/03/2022, 12:38 AM
If I have a simple one line function e.g.
fun foo() = "hello"
And I want to change this to have a body, because I need to add more lines. e.g
Copy code
fun foo(): String {
    return "hello"
}
Is there a refactoring that can do it for me?
k

kqr

02/03/2022, 7:13 AM
did you try alt+enter?
f

Fredrik Rødland

02/03/2022, 10:14 AM
image.png
t

Tom Haywood

02/03/2022, 11:04 AM
Thanks. Much appreciated
👍 1