-
-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
You may want to declare a multi-binding but provide no values. This is useful for cases where you want to 'extend' the set provided. Right now this is not possible because you have to declare at least one @IntoMap
or @IntoSet
in order for it to not complain that it can't provide the value. Dagger has 2 ways around this:
Add @Multibinds
to the provider
@Multibinds abstract fun aSet(): Set<Foo>
Provide an empty collection with @ElementsIntoSet
@Provides @ElementsIntoSet
fun primeEmptyFooSet(): Set<Foo> = emptySet()
asapha, rnett and nihk
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request