boolean (PsiVariable variable) { if (PsiUtil.isLanguageLevel10OrHigher(variable)) { PsiTypeElement typeElement = variable.getTypeElement(); if (typeElement != null && typeElement.isInferredType()) { return true; } } return false; }