groostav
07/12/2016, 9:05 PMval x = someObject?.someMethod() ?: return
is elegant and all, but it doesnt really allow me to handle the missing value flow as much as I would like, I can of course add an extra explicit check:
val x = someObject?.someMethod()
if(x == null){
log.warning("missing things!")
return;
}
and a smart-casts will even let me treat x
as a non-null type here, but its not quite as nice as an inline log-and-return or log-and-continue