I have an inline function which takes a predicate and an lambda where the lambda is only called if the predicate holds, how can I achieve that smart-casting works in the lambda if I have e.g. the following condition
foo != null
. I would like that foo is then non-null inside the lambda