private static boolean primitiveValueCanBeUsedForComparisonInCase(@Nullable PsiExpression value,
                                                                    @Nullable PsiExpression selector,
                                                                    @Nullable Set<Object> existingCaseValues) {
    if (value == null || selector == null) return false;
    Object o = ExpressionUtils.computeConstantExpression(value);
    if (o == null) {
      return false;
    }
    if (existingCaseValues != null && existingCaseValues.contains(o)) {
      return false;
    }
    if (existingCaseValues != null) {
      existingCaseValues.add(o);
    }
    PsiType selectorType = selector.getType();
    PsiType valueType = value.getType();
    if (selectorType == null || valueType == null) return false;
    PsiPrimitiveType unwrapped = PsiPrimitiveType.getOptionallyUnboxedType(selectorType);
    if (unwrapped != null && (isExtendedPrimitives(unwrapped))) {
      return unwrapped.equals(valueType);
    }
    return TypeConversionUtil.isAssignable(selectorType, valueType);
  }
private static boolean primitiveValueCanBeUsedForComparisonInCase(@Nullable PsiExpression value,
                                                                    @Nullable PsiExpression selector,
                                                                    @Nullable Set<Object> existingCaseValues)