Kotlin 1.3 has a Result<T> type if you opt into inline classes

Can Result be used as a return type in a function? The following code snippet will yield an error:

fun foo(): Result { // error ‘kotlin.Result’ cannot be used as a return type
return Result.success(“foo”)
}