private static boolean matches(@NotNull PsiType type, @NotNull PsiType expectedType, @Type int kind) {
    return switch (kind) {
      case TYPE_STRICTLY -> type.equals(expectedType);
      case TYPE_OR_SUBTYPE -> expectedType.isAssignableFrom(type);
      case TYPE_OR_SUPERTYPE -> type.isAssignableFrom(expectedType);
      default -> false;
    };
  }
private static boolean matches(@NotNull PsiType type, @NotNull PsiType expectedType, @Type int kind)