public static boolean isUnconditionallyExactForType(@NotNull PsiElement context, @NotNull PsiType type, PsiType patternType) {
    type = TypeConversionUtil.erasure(type);
    if ((type instanceof PsiPrimitiveType || patternType instanceof PsiPrimitiveType) &&
        PsiUtil.isAvailable(JavaFeature.PRIMITIVE_TYPES_IN_PATTERNS, context)) {
      if (type.equals(patternType)) return true;
      if (type instanceof PsiPrimitiveType && patternType instanceof PsiPrimitiveType) {
        return isExactPrimitiveWideningConversion(type, patternType);
      }
      else if (!(type instanceof PsiPrimitiveType)) {
        return false;
      }
      else {
        PsiClassType boxedType = ((PsiPrimitiveType)type).getBoxedType(context);
        return dominates(patternType, boxedType);
      }
    }
    else {
      return dominates(patternType, type);
    }
  }
public static boolean isUnconditionallyExactForType(@NotNull PsiElement context, @NotNull PsiType type, PsiType patternType)