Is there a way to specify parameter T to block as ...
# announcements
s
Is there a way to specify parameter T to block as not nullable type?
Copy code
inline fun <T> executeOrHandleNull( value : T, block : ( T ) -> Unit, nullHandler : () -> Unit ) {

    value?.let{
        block( it )
    } ?: nullHandler()

}