@SuppressWarnings("LambdaUnfriendlyMethodOverload")
  public <T extends PsiPolyVariantReference> ResolveResult @NotNull [] resolveWithCaching(@NotNull T ref,
                                                                                          @NotNull PolyVariantResolver<T> resolver,
                                                                                          boolean needToPreventRecursion,
                                                                                          boolean incompleteCode) {
    return resolveWithCaching(ref, resolver, needToPreventRecursion, incompleteCode, ref.getElement().getContainingFile());
  }
@SuppressWarnings("LambdaUnfriendlyMethodOverload")
  public <T extends PsiPolyVariantReference> ResolveResult @NotNull [] resolveWithCaching(@NotNull T ref,
                                                                                          @NotNull PolyVariantResolver<T> resolver,
                                                                                          boolean needToPreventRecursion,
                                                                                          boolean incompleteCode)