dagger-reflect
dagger-reflect copied to clipboard
Add messages to replaced explicit bindings
Fix 3 TODOs and cover them with tests. Note: I missed mapOfLazyKey deliberately, see #159.
Here's the Dagger output for these issues:
integration-tests\src\main\java\com\example\MultibindingSetConflict.java:13:
error: [Dagger/DuplicateBindings] java.util.Set<java.lang.String> has incompatible bindings or declarations:
interface MultibindingSetConflict {
^
Set bindings and declarations:
@Provides @dagger.multibindings.IntoSet String com.example.MultibindingSetConflict.Module1.one()
@Provides @dagger.multibindings.ElementsIntoSet Set<String> com.example.MultibindingSetConflict.Module1.three()
@Provides @dagger.multibindings.IntoSet String com.example.MultibindingSetConflict.Module1.two()
Unique bindings and declarations:
@Provides Set<String> com.example.MultibindingSetConflict.Module1.explicit()
java.util.Set<java.lang.String> is provided at
com.example.MultibindingSetConflict.values()
1 error
integration-tests\src\main\java\com\example\MultibindingMapConflict.java:12:
error: [Dagger/DuplicateBindings] java.util.Map<java.lang.Integer,java.lang.String> has incompatible bindings or declarations:
interface MultibindingMapConflict {
^
Map bindings and declarations:
@Provides @dagger.multibindings.IntoMap @dagger.multibindings.IntKey(1) String com.example.MultibindingMapConflict.Module1.one()
@Provides @dagger.multibindings.IntoMap @dagger.multibindings.IntKey(2) String com.example.MultibindingMapConflict.Module1.two()
Unique bindings and declarations:
@Provides Map<Integer,String> com.example.MultibindingMapConflict.Module1.explicit()
java.util.Map<java.lang.Integer,java.lang.String> is provided at
com.example.MultibindingMapConflict.values()
1 error
integration-tests\src\main\java\com\example\MultibindingMapProviderConflict.java:13:
error: [Dagger/DuplicateBindings] java.util.Map<java.lang.Integer,javax.inject.Provider<java.lang.String>> has incompatible bindings or declarations:
interface MultibindingMapProviderConflict {
^
Map bindings and declarations:
@Provides @dagger.multibindings.IntoMap @dagger.multibindings.IntKey(1) String com.example.MultibindingMapProviderConflict.Module1.one()
Unique bindings and declarations:
@Provides Map<Integer,Provider<String>> com.example.MultibindingMapProviderConflict.Module1.explicit()
java.util.Map<java.lang.Integer,javax.inject.Provider<java.lang.String>> is provided at
com.example.MultibindingMapProviderConflict.values()
1 error