private static boolean isApplicableClosureType(@Nullable PsiType type, PsiType @Nullable [] argTypes, @NotNull PsiElement place) {
    if (!(type instanceof GrClosureType)) {
      if (type instanceof GroovyClosureType) {
        throw new RuntimeException();
      }
      return false;
    }
    if (argTypes == null) return true;

    final List<GrSignature> signature = ((GrClosureType)type).getSignatures();
    return GrClosureSignatureUtil.isSignatureApplicable(signature, argTypes, place);
  }
private static boolean isApplicableClosureType(@Nullable PsiType type, PsiType @Nullable [] argTypes, @NotNull PsiElement place)