Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@JvmSuppressWildcards is placed in the wrong position in generated membersInjector #125

Closed
quiro91 opened this issue Sep 22, 2020 · 5 comments

Comments

@quiro91
Copy link
Contributor

quiro91 commented Sep 22, 2020

Given I have a class

class Box<T: CharSequence> @Inject constructor(val element: T)

and a second class where the first is injected:

class Fragment {
    @Inject lateinit var box: Box<String>

then I see a members injector generated as:

class Fragment_MembersInjector(
  private val param0: Provider<@JvmSuppressWildcards Box<String>>
) : MembersInjector<Fragment> {

but I think the position of @JvmSuppressWildcards is incorrect and should be instead

class Fragment_MembersInjector(
  private val param0: Provider<Box<@JvmSuppressWildcards String>>
) : MembersInjector<Fragment> {
@vRallev
Copy link
Collaborator

vRallev commented Sep 22, 2020

Does it cause compile errors?

@quiro91
Copy link
Contributor Author

quiro91 commented Sep 23, 2020

I was trying to create a repro sample for this, but I ended up discovering another bug. So I opened #126, and in the meantime I will investigate this better

@vRallev
Copy link
Collaborator

vRallev commented Sep 23, 2020

Is this now resolved?

@quiro91
Copy link
Contributor Author

quiro91 commented Sep 23, 2020

I'm gonna need to double check this, I was getting an error from KAPT in a downstream module that used a module where Anvil was generating factories. I'll try it out as soon as I can

@quiro91
Copy link
Contributor Author

quiro91 commented Sep 25, 2020

I can confirm this compiles fine. Closing the issue.

@quiro91 quiro91 closed this as completed Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants