Intent.action smart cast to "Kotlin.String!" is impossible (beta 2)


"Smart cast to "Kotlin.String!" is impossible, because 'intent.action' is a member value that has open or custom getter" in Kotlin Beta 2 under Android Studio. Is it studio plugin issue?


on the other hand


Unfortunately it's hard to see what the issue is from the very limited snippet that you have provided.



import android.appwidget.AppWidgetProvider
import android.content.Context
import android.content.Intent

class Test : AppWidgetProvider() {

  override fun onReceive(context: Context, intent: Intent) {
super.onReceive(context, intent)

  if (intent.action != null) {

           when (intent.action) {
           “1” -> {


There is an example. I've created an issue 10061