dagger
dagger copied to clipboard
Don't explode on wildcard types
Given this input:
@Provides Class<? extends MyInterface> provideClassImpl() {
return InterfaceImpl.class;
}
Dagger fails like this:
java.lang.UnsupportedOperationException: Uninjectable type ? extends com.sample.app.di.MyInterface
E/AndroidRuntime( 6701): at dagger.internal.Keys.typeToString(Keys.java:169)
E/AndroidRuntime( 6701): at dagger.internal.Keys.typeToString(Keys.java:161)
E/AndroidRuntime( 6701): at dagger.internal.Keys.get(Keys.java:79)
E/AndroidRuntime( 6701): at dagger.internal.Keys.get(Keys.java:111)
We should handle wildcard types!