https://kotlinlang.org logo
#announcements
Title
# announcements
j

joejungmann

10/26/2017, 4:24 PM
Copy code
@Provides @IntoMap @StringKey("job_example_tag")
  fun <T : Job> providesExampleJob(target: Provider<ExampleJob>): Provider<T> = target
a

anthonycr

10/26/2017, 5:22 PM
I’m not sure exactly what errors you’re seeing, but for kotlin and generics you will need to add the
@JvmSuppressWildcards
annotation in order to get dagger to generate the correct code. See https://github.com/google/dagger/issues/900 and https://stackoverflow.com/questions/43141740/dagger-2-multibindings-with-kotlin/43149382#43149382
7 Views