You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
block return type R is defined as <R>, not <R: Any>. If block produces null (e.g. Int?) and no exception is thrown, return will cause a KotlinNullPointerException.
A cast as R instead of a double banger is needed on result
The text was updated successfully, but these errors were encountered:
05nelsonm
changed the title
Closable.use throws NPE whe block returns nullableClosable.use throws NPE when block returns nullable
Mar 3, 2024
block
return typeR
is defined as<R>
, not<R: Any>
. Ifblock
producesnull
(e.g.Int?
) and no exception is thrown, return will cause aKotlinNullPointerException
.A cast as
R
instead of a double banger is needed on resultThe text was updated successfully, but these errors were encountered: