why not val context = base?.let{LocaleManager.instance.onAttach(it)}
a
Aamer Paul
09/11/2018, 11:38 AM
Using base?.let{..} it is showing same suggestion # smart cast to android.content.Context
l
lex
09/11/2018, 11:41 AM
and what is wrong?
a
Aamer Paul
09/11/2018, 11:42 AM
Nothing is wrong. But it is showing suggestions i should smart cast base to ..Context
Aamer Paul
09/11/2018, 11:47 AM
Means there is better way to do it?
r
rkeazor
09/11/2018, 11:52 AM
Nothing is wrong. It's just saying since, your case statement is checking if base is equal to null, base got smart casted from android.content.Context? To android.content.Context