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

Add common supertype for type-variable owners #66

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -265,24 +265,13 @@ static WildcardType wildcard(BoundKind kind, JavaType bound) {
}

/**
* Constructs a reference to a class type-variable.
* Constructs a reference to a type-variable with the given owner.
*
* @param bound the type-variable bound.
* @param owner the class where the type-variable is declared.
* @param owner the type-variable owner.
* @return a type-variable reference.
*/
static TypeVarRef typeVarRef(String name, ClassType owner, JavaType bound) {
return new TypeVarRef(name, owner, bound);
}

/**
* Constructs a reference to a method type-variable.
*
* @param bound the type-variable bound.
* @param owner the method where the type-variable is declared.
* @return a type-variable reference.
*/
static TypeVarRef typeVarRef(String name, MethodRef owner, JavaType bound) {
static TypeVarRef typeVarRef(String name, TypeVarRef.Owner owner, JavaType bound) {
return new TypeVarRef(name, owner, bound);
}