the compiler is right in your case: `<T : A>...
# announcements
c
the compiler is right in your case:
<T : A>
means that your function will return
T
but you return
B
. See example on call site:
Copy code
data class X(val ... ) : A { }

fun f(): X = B().doSomething()  // here T is X but you return B