Open
Description
When attempting to multibind classes with type parameters:
@ContributesMultibinding(SomeScope::class)
class MyClass: SomeInterface<String>
Anvil will complain that Type parameters in bindings are not supported. This binding needs to be contributed in a Dagger module manually.
I understand that this is a problem, because Anvil can't know what type parameter should be used on bound type (there is no way to specify that in annotation). But, maybe we could just support the most basic version?
We could just add star to all type bindings, so above example would get bound to the SomeInterface<*>
type. It does not cover many use cases, but I think it's still better than not supporting this at all. Any other non-star cases can still use module like now.
I'm willing to submit PR for this, if desired.
Metadata
Assignees
Labels
No labels