Skip to content

Commit be220e7

Browse files
committed
comments
1 parent e884047 commit be220e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,6 +1635,9 @@ private Type.MethodType restoreMissingNullabilityFromSingleTopLevelTypeVarArgume
16351635
return methodTypeAtCallSite;
16361636
}
16371637

1638+
// use this map to store repaired substitutions for method type variables, to ensure we use the
1639+
// same repaired
1640+
// substitution for all occurrences of the same method type variable
16381641
Map<Symbol.TypeVariableSymbol, Type> repairedTopLevelSubstitutions = new HashMap<>();
16391642
ListBuffer<Type> updatedArgTypes = new ListBuffer<>();
16401643
boolean changed = false;
@@ -1659,7 +1662,7 @@ private Type.MethodType restoreMissingNullabilityFromSingleTopLevelTypeVarArgume
16591662
changed = true;
16601663
updatedType = repairedSubstitution;
16611664
}
1662-
} else {
1665+
} else { // need to compute the substitution
16631666
Type actualArgType = getTreeType(callArgs.get(i), state);
16641667
if (actualArgType != null
16651668
&& !actualArgType.isRaw()

0 commit comments

Comments
 (0)