}
final PsiType[] superTypes = currentType.getSuperTypes();
currentType = null;
for (PsiType type : superTypes) {
final PsiClass aClass = PsiTypesUtil.getPsiClass(type);
<BUG>if (aClass != null && InheritanceUtil.isInheritor(aClass, GuavaFunctionConversionRule.GUAVA_FUNCTION)) {
</BUG>
currentType = type;
break;
}

}
PsiType currentType = functionExpression.getType();
if (currentType == null) return null;
while (true) {
if (LambdaUtil.isFunctionalType(currentType)) {
return LambdaUtil.getFunctionalInterfaceReturnType(currentType);
}
final PsiType[] superTypes = currentType.getSuperTypes();
currentType = null;
for (PsiType type : superTypes) {
final PsiClass aClass = PsiTypesUtil.getPsiClass(type);
if (aClass != null && InheritanceUtil.isInheritor(aClass, GuavaLambda.FUNCTION.getClassQName())) {
currentType = type;
break;
