Validate parameters in fillInSubstitutionContext

This commit is contained in:
Stepan Koltsov
2012-05-28 17:34:44 +04:00
parent a1714d99cf
commit c2c45669f0
@@ -95,6 +95,9 @@ public class SubstitutionUtils {
}
private static void fillInSubstitutionContext(List<TypeParameterDescriptor> parameters, List<TypeProjection> contextArguments, Map<TypeConstructor, TypeProjection> parameterValues) {
if (parameters.size() != contextArguments.size()) {
throw new IllegalArgumentException("type parameter count != context arguments");
}
for (int i = 0, parametersSize = parameters.size(); i < parametersSize; i++) {
TypeParameterDescriptor parameter = parameters.get(i);
TypeProjection value = contextArguments.get(i);