title: Android Hilt injecting interface to a viewmodel impelemented by an activity
body: <p>New to DI, Using Hilt I'm trying to inject an interface implemented by an activty to a viewmodel like this:</p>
  <p>Activity class:</p>
  <pre><code>@AndroidEntryPoint
  class MainActivity  : AppCompatActivity(), AnInterface{
      private val mainViewModel : MainViewModel by viewModels()
      // .....
  }
  </code></pre>
  <p>ViewModel :</p>
  <pre><code>@HiltViewModel
  class MainViewModel : ViewModel() @Inject constructor(anInterface : AnInterface){
  
  }
  
  </code></pre>
  <p>Module:</p>
  <pre><code>@Module
  @InstallIn(ActivityComponent::class)
  class ActivityModule {
      @Provides
      fun provideAnInterface(activity: Activity) : AnInterface = activty as AnInterface
  
  }
  
  </code></pre>
  <p>Gives me error :</p>
  <pre><code>AnInterface cannot be provided without an @Provides-annotated method.
  </code></pre>