void (@NotNull List<CandidateInfo> conflicts) { List<CandidateInfo> partiallyApplicable = new ArrayList<>(); for (Iterator<CandidateInfo> iterator = conflicts.iterator(); iterator.hasNext(); ) { CandidateInfo conflict = iterator.next(); if (conflict instanceof MethodCandidateInfo) { ThreeState compatible = ((MethodCandidateInfo)conflict).isPotentiallyCompatible(); if (compatible == ThreeState.NO) { iterator.remove(); } else if (compatible == ThreeState.UNSURE) { partiallyApplicable.add(conflict); } } } if (conflicts.size() > partiallyApplicable.size()) { conflicts.removeAll(partiallyApplicable); } }