boolean (@NotNull PsiElement element) { if (this instanceof PsiPolyVariantReference reference) { final ResolveResult[] results = reference.multiResolve(false); for (ResolveResult result : results) { if (Comparing.equal(result.getElement(), element)) return true; } return false; } else { return Comparing.equal(resolve(), element); } }