I'm doing lesson from here: https://dagger.dev/tutorial/07-two-for-the-price-of-one
When I'm changing code
@Module
abstract class HelloWorldModule {
@Binds
abstract fun helloWorldCommand(command: HelloWorldCommand): Command
}
into
@Module
abstract class HelloWorldModule {
@Binds
@IntoMap
@StringKey("hello")
abstract fun helloWorldCommand(command: HelloWorldCommand): Command
}
I'm getting error:
error: [Dagger/MissingBinding] Map<String,? extends Command>
cannot be provided without an @Provides-annotated method.
What I'm missing here? It won't work on Kotlin?