PsiType (final PsiElement context) { PsiType targetType = getTargetTypeFromParent(context, new Ref<>(), true); if (targetType instanceof PsiClassType) { return ((PsiClassType)targetType).setLanguageLevel(PsiUtil.getLanguageLevel(context)); } return targetType; }