Skip to content

Commit 7e19973

Browse files
gselzerctrueden
authored andcommitted
Pass TypeAssigns along to more places
More research needed to determine whether this approach is really right. Signed-off-by: Curtis Rueden <ctrueden@wisc.edu>
1 parent 227ba44 commit 7e19973

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/scijava/ops/matcher/MatchingUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ private static boolean checkGenericAssignability(Type[] srcTypes, Type[] destTyp
336336
// assignability
337337
Class<?> matchingRawType = Types.raw(dest);
338338
Type inferredSrcType = Types.parameterize(matchingRawType, mappedSrcTypes);
339-
if (!Types.isAssignable(inferredSrcType, dest)) {
339+
if (!Types.isAssignable(inferredSrcType, dest, typeVarAssigns)) {
340340
if (!safeAssignability || !isSafeAssignable(destTypes, typeVarAssigns, src, dest))
341341
return false;
342342
}
@@ -477,7 +477,7 @@ private static void inferTypeVariables(Type[] types, Type[] inferFrom, Map<TypeV
477477
if (!(inferFrom[i] instanceof ParameterizedType)) {
478478
Type[] fromType = { types[i] };
479479
fromType = Types.mapVarToTypes(fromType, typeAssigns);
480-
if (!Types.isAssignable(inferFrom[i], fromType[0])) {
480+
if (!Types.isAssignable(inferFrom[i], fromType[0], typeAssigns)) {
481481
throw new TypeInferenceException();
482482
}
483483
} else {

0 commit comments

Comments
 (0)