InferenceStep (PsiType targetType, PsiType argType, PsiTypeParameter @NotNull [] typeParameters) { if (targetType instanceof PsiClassType && TypesUtil.isClassType(targetType, GroovyCommonClassNames.GROOVY_LANG_CLOSURE)) { PsiType[] parameters = ((PsiClassType)targetType).getParameters(); if (parameters.length != 1) return InferenceStep.EMPTY; return buildReturnTypeClosureStep(argType, parameters[0], typeParameters); } if (isSamConversionAllowed(myPlace)) { return handleConversionOfSAMType(targetType, argType, typeParameters); } return InferenceStep.EMPTY; }