static void registerExpectedTypeFixes(@NotNull HighlightInfo.Builder info,
                                        @NotNull TextRange textRange,
                                        @NotNull PsiExpression expression,
                                        @Nullable PsiType expectedType,
                                        @Nullable PsiType actualType) {
    if (actualType == null || expectedType == null) return;
    boolean mentionsTypeArgument = mentionsTypeArgument(expression, actualType);
    expectedType = GenericsUtil.getVariableTypeByExpressionType(expectedType);
    TextRange range = expression.getTextRange();
    String role = textRange.equals(range) ? null : getRole(expression);
    if (!mentionsTypeArgument) {
      IntentionAction action3 = new WrapWithAdapterMethodCallFix(expectedType, expression, role);
      info.registerFix(action3, null, null, null, null);
      IntentionAction action2 = QuickFixFactory.getInstance().createWrapWithOptionalFix(expectedType, expression);
      info.registerFix(action2, null, null, null, null);
      var action1 = new WrapExpressionFix(expectedType, expression, role);
      info.registerFix(action1, null, null, null, null);
      PsiType castToType = suggestCastTo(expectedType, actualType);
      if (castToType != null) {
        ModCommandAction action = new AddTypeCastFix(castToType, expression, role);
        info.registerFix(action, null, null, null, null);
      }
    }
    if (expectedType instanceof PsiArrayType) {
      PsiType erasedValueType = TypeConversionUtil.erasure(actualType);
      if (erasedValueType != null &&
          TypeConversionUtil.isAssignable(((PsiArrayType)expectedType).getComponentType(), erasedValueType)) {
        IntentionAction action = QuickFixFactory.getInstance().createSurroundWithArrayFix(null, expression);
        info.registerFix(action, null, null, null, null);
      }
    }
    HighlightFixUtil.registerCollectionToArrayFixAction(info, actualType, expectedType, expression);
    if (expression instanceof PsiMethodCallExpression call) {
      PsiExpression qualifier = call.getMethodExpression().getQualifierExpression();
      if (qualifier != null) {
        PsiType type = qualifier.getType();
        if (type != null && expectedType.isAssignableFrom(type)) {
          info.registerFix(new ReplaceWithQualifierFix(call, role), null, null, null, null);
        }
      }
      PsiMethod argMethod = call.resolveMethod();
      if (argMethod != null) {
        registerPatchParametersFixes(info, textRange, call, argMethod, expectedType, actualType);
      }
    }
  }
static void registerExpectedTypeFixes(@NotNull HighlightInfo.Builder info,
                                        @NotNull TextRange textRange,
                                        @NotNull PsiExpression expression,
                                        @Nullable PsiType expectedType,
                                        @Nullable PsiType actualType)