On 2.51.1, when we try switching to Dagger KSP, our compilation breaks with the following:
/../view/component/SomeView_MembersInjector.java:46: error: incompatible types: Map<SomeType1,CAP#1> cannot be converted to Map<SomeType1,SomeType2<?,?>>
instance.viewBinderMap = viewBinderMap;
^
where CAP#1 is a fresh type-variable:
CAP#1 extends SomeType2<?,?> from capture of ? extends SomeType2<?,?>
1 error
If we take out the typealias then it starts working.
@AndroidEntryPoint
internal class SomeView(context: Context, attributeSet: AttributeSet?) : RecyclerView(context, attributeSet) {
// Without typealiases, this is an eyesore.
@Inject
lateinit var viewBinderMap: Map<@JvmSuppressWildcards SomeType1, @JvmSuppressWildcards SomeType2<*, *>>
...
}
On 2.51.1, when we try switching to Dagger KSP, our compilation breaks with the following:
The offender looks like this:
If we take out the
typealias
then it starts working.