Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Fix looking up generics when injecting fields in generic subclasses.#167

Closed
amatkovsky wants to merge 2 commits intoJakeWharton:masterfrom
amatkovsky:fix-multiple-nested-generics-lookup
Closed

Fix looking up generics when injecting fields in generic subclasses.#167
amatkovsky wants to merge 2 commits intoJakeWharton:masterfrom
amatkovsky:fix-multiple-nested-generics-lookup

Conversation

@amatkovsky
Copy link
Copy Markdown
Contributor

This pr adds a test to cover the case when there are @Inject annotated fields with type parameters. Real world example: a class BaseFragment<P extends Presenter> with a field P presenter.
The fix included is just an ad-hoc solution to highlight the issue and help come up with proper fix.

@runningcode
Copy link
Copy Markdown
Contributor

Is this a duplicate of this? #129

@amatkovsky
Copy link
Copy Markdown
Contributor Author

Is this a duplicate of this? #129

I am not sure. It looks like your pr deals with generics when resolving jit bindings while this pr is about resolving bindings for the fields.
But I think your solution may be expanded to cover this case too.

@amatkovsky amatkovsky closed this Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants