void (DiagnosticCollector collector, List<TypeParameterDescriptor> parameters) { for (int i = 0; i < parameters.size(); i++) { TypeParameterDescriptor typeParameterDescriptor = parameters.get(i); if (typeParameterDescriptor.getIndex() != i) { report(collector, typeParameterDescriptor, "Incorrect index: " + typeParameterDescriptor.getIndex() + " but must be " + i); } } }