I wrote a function that returns a `kotlin.Result` ...
# codingconventions
k
I wrote a function that returns a
kotlin.Result
. The project I'm working on currently uses Kotlin 1.6.21, and IDEA 2022.1 tells me "Function returning Result with a name that does not end with Catching". Is this a recommended coding convention? What is the disadvantage of not ending in "Catching"? Also, when I click on "Show inspection description", it says "Result should never be used as a return type." I know that was the case in an old version of Kotlin, when the Result type was first introduced, but I thought that was now changed and that we can now return Result. Is this something that should be changed in IDEA?
g
Per result-keep after kotlin 1.5 you should be able to use it. Maybe worth to open a ticket
k
Thanks, George, I've created IDEA-300447.