eygraber
11/26/2023, 6:29 PMfun handleClicks(
onClick: () -> Unit,
onLongClick: () -> Unit
)
loses context when called like
handleClicks(
onClick = {...}
) {
...
}
wasyl
11/26/2023, 7:12 PMPHondogo
11/26/2023, 7:16 PMfun handleClicks(
onClick: () -> Unit,
onLongClick: () -> Unit,
noLambda: Nothing? = null
)
mbonnin
11/26/2023, 7:34 PMephemient
11/26/2023, 10:01 PMRuckus
11/30/2023, 4:17 PMnoLambda: Nothing? = null
, I would recommend vararg noLambda: Nothing
, It reduces the potential confusion of something like:
handleClicks(
{ ... },
{ ... },
someFunctionThatReturnsNull(),
)
Though it's probably not a big deal.