gabrielfv
07/23/2020, 5:32 PMinterface Foo<A : Bar, B : Baz>
And a series of implementations which I want to bind into a dagger map, is it possible to bind them like so?
@Binds
@IntoMap
@FooKey(ExampleFoo::class)
fun bindExampleFoo(exampleFoo: ExampleFoo): Foo<*, *>
To me, if I have a key like this:
@MapKey
annotation class FooKey(val value: KClass<out Foo<*, *>>)
It will fail me with a weird error message:
error: incompatible types: Class<ExampleFoo> cannot be converted to Class<? extends Foo<?,?>>
gabrielfv
07/23/2020, 5:34 PMExampleFoo
“is a” ? extends Foo<?, ?>
.