void checkSwitchSelectorType(@NotNull Consumer<? super HighlightInfo.Builder> errorSink) {
    SelectorKind kind = getSwitchSelectorKind();
    if (kind == SelectorKind.INT) return;

    JavaFeature requiredFeature = null;
    if (kind == SelectorKind.ENUM) requiredFeature = JavaFeature.ENUMS;
    if (kind == SelectorKind.STRING) requiredFeature = JavaFeature.STRING_SWITCH;

    if (kind == null || requiredFeature != null && !requiredFeature.isSufficient(myLevel)) {
      boolean is7 = myLevel.isAtLeast(LanguageLevel.JDK_1_7);
      String expected = JavaErrorBundle.message(is7 ? "valid.switch.1_7.selector.types" : "valid.switch.selector.types");
      HighlightInfo.Builder info =
        createError(mySelector, JavaErrorBundle.message("incompatible.types", expected, JavaHighlightUtil.formatType(mySelectorType)));
      registerFixesOnInvalidSelector(info);
      if (requiredFeature != null) {
        HighlightUtil.registerIncreaseLanguageLevelFixes(mySelector, requiredFeature, info);
      }
      errorSink.accept(info);
    }
    checkIfAccessibleType(errorSink);
  }
void checkSwitchSelectorType(@NotNull Consumer<? super HighlightInfo.Builder> errorSink)