title: How to set type to generic?
body: <p>I have this generic in seald class:</p>
  <pre><code>sealed class ResponseResult {
      class Success&lt;T&gt;(val data: T, val city: String) : ResponseResult()
  }
  </code></pre>
  <p>I'm setting my Response&lt;Weather&gt; body in this Success class with succesful call in my ViewModel:</p>
  <pre><code>if (response.isSuccessful) {
     response.body().let {
     _screenState.postValue(ResponseResult.Success(it, cityName))
  }
  </code></pre>
  <p>but when i'm trying to get fields from my Weather array (which is Response type of) in fragment i can't get them because my type is Any.</p>
  <pre><code>viewModel.screenState.observe(viewLifecycleOwner) {
              when (it) {
                  is ResponseResult.Success&lt;*&gt; -&gt; {
                      setSuccessResult()
                      it.data.
                  }
  </code></pre>
  <p>How can i make my generic understand that this is type of &quot;Weather&quot;?</p>