You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where arg0 is correct for those first two as assisted inputs, but then weirdly pops up later. That specific later position (right before searchTrackerImpl()) is of some interested - its type is LoggedInUser and it's the sole @BindsInstance argument of the subcomponent's factory method.
When I look more closely, the problem is that the LoggedInUser argument passed into the factory is also called arg0.
privatefinalclassTestUserComponentImplimplementsTestUserComponent {
privatefinalLoggedInUserarg0; // <--- This is what it's trying to use in searchResultsView() below
As a result, I think the fix is that it either needs to use NameAllocator or qualify the second arg0 call with this.arg0. Confirmed this is broken in both 2.34.1 and 2.35
The text was updated successfully, but these errors were encountered:
Interestingly, we seem to avoid this when consuming old generated factories. Dagger generates a wildly different component when this version of an upstream library is used, suggesting some sort of compatibility mode maybe?
We've run into a strange bug in Dagger when combining assisted inject and component factories.
Some context: It generates code that doesn't compile in a subcomponent. In particular, it passes the wrong parameter into an assisted injected view
Example:
Where
arg0
is correct for those first two as assisted inputs, but then weirdly pops up later. That specific later position (right beforesearchTrackerImpl()
) is of some interested - its type is LoggedInUser and it's the sole@BindsInstance
argument of the subcomponent's factory method.When I look more closely, the problem is that the LoggedInUser argument passed into the factory is also called
arg0
.As a result, I think the fix is that it either needs to use NameAllocator or qualify the second
arg0
call withthis.arg0
. Confirmed this is broken in both 2.34.1 and 2.35The text was updated successfully, but these errors were encountered: