PsiUtil.resolveClassInType used (IDEA-CR-14640)

This commit is contained in:
Tagir Valeev
2016-10-19 16:33:09 +07:00
parent 19af166e5d
commit 3cc3a4e47d
@@ -298,9 +298,7 @@ public class LambdaCanBeMethodReferenceInspection extends BaseJavaBatchLocalInsp
return null;
}
PsiType type = typeElement.getType();
if (type instanceof PsiPrimitiveType) return null;
type = type.getDeepComponentType();
if (type instanceof PsiClassType && (((PsiClassType)type).resolve() instanceof PsiTypeParameter)) return null;
if (type instanceof PsiPrimitiveType || PsiUtil.resolveClassInType(type) instanceof PsiTypeParameter) return null;
return expression;
}
}