#79 Dokka can't find return type function with exp...
# dokka
u
#79 Dokka can't find return type function with expression body and omitted return type [Kotlin/dokka] Issue created by porokoro If a class exists with functions where an expression body is used and also the return type is omitted, Dokka sometimes is unable to find the return type. It seems that the return type can't be resolved as soon as generic methods of the kotlin-stdlib are used. For example for every function class starting with the name
broken
the return type can't be resolved:
Copy code
kotlin
package com.github.porokoro.example

data class Test(var value: String) {
    fun brokenApply(v: String) = apply { value = v }
```fun brokenRun(v: String) = run {
    value = v
    this
}

fun brokenLet(v: String) = let {
    it.value = v
    it
}

fun brokenGenerics() = listOf("a", "b", "c")

fun working(v: String) = doSomething()

fun doSomething(): String = "Hello"
} ``` This results in warnings about unresolved types during generation and creates
<ERROR CLASS>
entries in the documentation. I attached a screenshot of the resulting documentation:

Documentation error types