No, I don't want the parameter to be nullable. The...
# getting-started
l
No, I don't want the parameter to be nullable. The receiver is nullable. Here is the actual example:
target: StepperCallback?.() -> Boolean
which is then called as
target.invoke(it.second)
. I am concerned that that
invoke
call isn't returning a
Boolean?
but rather
Boolean
. If the receiver is nullable, then
target.invoke(null)
is a valid expression, but what does it return? Intuitively to me, it should return a
null
of type
Boolean?
, but Android Studio is telling me that the return type of
target.invoke()
is a
Boolean
.