Open AndroidDeveloperLB opened 2 years ago
Often when I convert from Java to Kotlin, I see something like this:
foo((value as Boolean?)!!)
Instead, it should be like this:
foo(value as Boolean)
If foo is defined only as foo(Boolean) , it could even be replaced in this case to just:
foo
foo(Boolean)
foo(value)
Can you please add this ? I don't know of similar cases, but maybe there are some...
Yes! Any chain with ?s inside looks suspicious when ends with !!.
?
!!
You say you know of other, similar cases?
Often when I convert from Java to Kotlin, I see something like this:
Instead, it should be like this:
If
foo
is defined only asfoo(Boolean)
, it could even be replaced in this case to just:Can you please add this ? I don't know of similar cases, but maybe there are some...