title: Type mismatch: inferred type is Any but List<SportNewsResponse>? was expected
body: <p>I am developing news app and I am getting following error in my MainViewModel.kt class
   Type mismatch: inferred type is Any but List? was expected</p>
  
  <p>below My MainViewModel.kt</p>
  
  <pre><code>class MainViewModel(
      private val sportNewsInterface: SportNewsInterface
  
  ) : ViewModel(), CoroutineScope {
      // Coroutine's background job
      private val job = Job()
      // Define default thread for Coroutine as Main and add job
      override val coroutineContext: CoroutineContext = Dispatchers.Main + job
  
      private val showLoading = MutableLiveData&lt;Boolean&gt;()
      private val sportList = MutableLiveData &lt;List&lt;SportNewsResponse&gt;&gt;()
      val showError = SingleLiveEvent&lt;String&gt;()
  
      fun loadNews() {
          // Show progressBar during the operation on the MAIN (default) thread
          showLoading.value = true
          // launch the Coroutine
          launch {
              // Switching from MAIN to IO thread for API operation
              // Update our data list with the new one from API
              val result = withContext(Dispatchers.IO) { sportNewsInterface.getNews()
              }
              // Hide progressBar once the operation is done on the MAIN (default) thread
              showLoading.value = false
              when (result) {
  
  
                  is UseCaseResult.Success&lt;*&gt; -&gt; {
                      sportList.value = result.data
                  }
                  is UseCaseResult.Error -&gt; showError.value = result.exception.message
                   }
                  }
              }
  
  
  
      override fun onCleared() {
          super.onCleared()
          // Clear our job when the linked activity is destroyed to avoid memory leaks
          job.cancel()
      }
  }
  </code></pre>
  
  <p>below UserCaseResult.kt</p>
  
  <pre><code>sealed class UseCaseResult&lt;out T : Any&gt; {
      class Success&lt;out T : Any&gt;(val data: T) : UseCaseResult&lt;List&lt;SportNewsResponse&gt;&gt;()
  
      class Error(val exception: Throwable) : UseCaseResult&lt;Nothing&gt;()
  }
  </code></pre>