How can I restrict generic parameter to be non-nullable?

38 views Asked by At

I have following signature:

 fun <T, R> JsonNullable<T>.map(func: (T) -> R): JsonNullable<R> {

How can I restrict T and R to be non-nullable ?

0

There are 0 answers