https://kotlinlang.org logo
#android
Title
# android
a

Aamer Paul

09/11/2018, 11:32 AM
How to handle this?
d

Denis A

09/11/2018, 11:35 AM
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
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
a

Aamer Paul

09/11/2018, 12:10 PM
Okay. Thanks
2 Views