This repository was archived by the owner on Aug 20, 2025. It is now read-only.
Open
Conversation
runningcode
commented
Jul 1, 2019
| } | ||
| } else if (enclosingClass != null) { | ||
| throw new IllegalArgumentException("unexpected owner type for " + rawType + ": null"); | ||
| // TODO ? |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
52cb004 to
2ae5f7c
Compare
runningcode
commented
Jul 5, 2019
| Type[] matchingTypes = matchingParameterizedType(parameterType.getActualTypeArguments()); | ||
| return new TypeUtil.ParameterizedTypeImpl(null, parameterType.getRawType(), matchingTypes); | ||
| return new TypeUtil.ParameterizedTypeImpl( | ||
| parameterType.getOwnerType(), parameterType.getRawType(), matchingTypes); |
Contributor
Author
There was a problem hiding this comment.
@JakeWharton i wasn't passing in the owner type here which was causing the exception. it is now resolved.
runningcode
commented
Jul 16, 2019
| @AutoValue | ||
| abstract class Key { | ||
| static Key of(@Nullable Annotation qualifier, Type type) { | ||
| if (containsTypeVariable(type)) { |
Contributor
Author
There was a problem hiding this comment.
@JakeWharton I can remove this check if it is causing any second thoughts on merging this PR.
It helps surface unsupported bindings in Dagger Reflect as soon as possible. When a Key which includes <T> instead of a real type, it immediately throws an error.
It has a bit of a runtime cost since it recursively checks the type and its parameters whenever a Key is constructed.
added 2 commits
August 6, 2019 15:15
Dont allow type variables in keys.
2ae5f7c to
c1d299d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dont allow type variables in keys.