mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
overload resolution: ensure validity of isApplicable call if there is exactly one potentially applicable method
This commit is contained in:
@@ -125,6 +125,11 @@ public class MethodCandidateInfo extends CandidateInfo{
|
||||
final PsiMethod method = getElement();
|
||||
|
||||
if (isToInferApplicability()) {
|
||||
if (!isOverloadCheck()) {
|
||||
//ensure applicability check is performed
|
||||
getSubstitutor(false);
|
||||
}
|
||||
|
||||
//already performed checks, so if inference failed, error message should be saved
|
||||
if (myInferenceError != null || !isPotentiallyCompatible()) {
|
||||
return ApplicabilityLevel.NOT_APPLICABLE;
|
||||
|
||||
Reference in New Issue
Block a user