@Override
      protected boolean check(PsiVariable var, ResolveState state) {
        return var instanceof PsiPatternVariable && super.check(var, state);
      }
@Override
      protected boolean check(PsiVariable var, ResolveState state)