mattinger
10/20/2022, 11:04 PMinterface SomeType
class Type1: SomeType
class MyFactory
@Module
@ContributesTo(MyLibraryScope::class)
class SomeTypeModule {
@Provides
@IntoMap
@ClassKey(Type1::class)
fun type1Factory(): () -> SomeType = { Type1() }
@Provides
fun x(
factories: Map<Class<*>, () -> SomeType>
): MyFactory = MyFactory()
}
error: [Dagger/MissingBinding] java.util.Map<java.lang.Class<?>,? extends kotlin.jvm.functions.Function0<? extends com.xfinity.dh.feature.library.di.SomeType>> cannot be provided without an @Provides-annotated method.