PsiType (@NotNull GrFunctionalExpression expression, int index) { PsiFile file = expression.getContainingFile(); if (file == null || !FileUtilRt.extensionEquals(file.getName(), GradleConstants.EXTENSION)) return null; PsiType psiType = super.getClosureParameterType(expression, index); if (psiType instanceof PsiWildcardType wildcardType) { if (wildcardType.isSuper() && wildcardType.getBound() != null && wildcardType.getBound().equalsToText(GradleCommonClassNames.GRADLE_API_SOURCE_SET)) { return wildcardType.getBound(); } if (wildcardType.isSuper() && wildcardType.getBound() != null && wildcardType.getBound().equalsToText(GradleCommonClassNames.GRADLE_API_DISTRIBUTION)) { return wildcardType.getBound(); } } return null; }