Skip to content

Commit

Permalink
[flow][cleanup][EZ] Kill EFunPredInvalidIndex
Browse files Browse the repository at this point in the history
Summary:
Unused

Changelog: [internal]

Reviewed By: gkz

Differential Revision: D56271373

fbshipit-source-id: a5859eca8d1256175d10eb9fe86e412f246bd48a
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Apr 17, 2024
1 parent 56ad99d commit 1d6ec18
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/typing/debug_js.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,6 @@ let dump_error_message =
| EAmbiguousNumericKeyWithVariance loc ->
spf "EAmbiguousNumericKeyWithVariance (%s)" (string_of_aloc loc)
| EPredicateFuncTooShort { loc; _ } -> spf "EPredicateFuncTooShort (%s)" (string_of_aloc loc)
| EFunPredInvalidIndex loc -> spf "EFunPredInvalidIndex (%s)" (string_of_aloc loc)
| EPredicateFuncArityMismatch { use_op; _ } ->
spf "EPredicateFuncArityMismatch (%s)" (string_of_use_op use_op)
| EPredicateFuncIncompatibility { use_op; _ } ->
Expand Down
15 changes: 0 additions & 15 deletions src/typing/errors/error_message.ml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ and 'loc t' =
pred_reason: 'loc virtual_reason;
binding_reason: 'loc virtual_reason;
}
| EFunPredInvalidIndex of 'loc
| ETypeGuardIndexMismatch of {
use_op: 'loc virtual_use_op;
reasons: 'loc virtual_reason * 'loc virtual_reason;
Expand Down Expand Up @@ -1172,7 +1171,6 @@ let rec map_loc_of_error_message (f : 'a -> 'b) : 'a t' -> 'b t' =
}
| ETypeGuardIncompatibleWithFunctionKind { loc; kind } ->
ETypeGuardIncompatibleWithFunctionKind { loc = f loc; kind }
| EFunPredInvalidIndex loc -> EFunPredInvalidIndex (f loc)
| EInternal (loc, i) -> EInternal (f loc, i)
| EUnsupportedSyntax (loc, u) -> EUnsupportedSyntax (f loc, u)
| EUseArrayLiteral loc -> EUseArrayLiteral (f loc)
Expand Down Expand Up @@ -1642,7 +1640,6 @@ let util_use_op_of_msg nope util = function
| EPredicateFuncArityMismatch _
| EPredicateFuncIncompatibility _
| EPredicateInvalidParameter _
| EFunPredInvalidIndex _
| ETypeGuardIndexMismatch _
| EInternal (_, _)
| EUnsupportedSyntax (_, _)
Expand Down Expand Up @@ -1924,7 +1921,6 @@ let loc_of_msg : 'loc t' -> 'loc option = function
| ETrivialRecursiveDefinition (loc, _)
| EInvalidCatchParameterAnnotation loc
| EInvalidMappedType { loc; _ }
| EFunPredInvalidIndex loc
| EPredicateFuncTooShort { loc; _ }
| ETSSyntax { loc; _ }
| EReferenceInAnnotation (loc, _, _)
Expand Down Expand Up @@ -3013,16 +3009,6 @@ let friendly_message_of_msg loc_of_aloc msg =
use_op;
explanation = None;
}
| EFunPredInvalidIndex _ ->
Normal
{
features =
[
text "The index position of a ";
code "$Refine";
text " type needs to be a positive integer.";
];
}
| EPredicateInvalidParameter { pred_reason; binding_reason } ->
Normal
{
Expand Down Expand Up @@ -5677,7 +5663,6 @@ let error_code_of_message err : error_code option =
| EFunctionCallExtraArg _ -> Some ExtraArg
| EPredicateFuncTooShort _
| EPredicateFuncArityMismatch _
| EFunPredInvalidIndex _
| EPredicateFuncIncompatibility _
| EPredicateInvalidParameter _
| ETypeGuardIndexMismatch _
Expand Down

0 comments on commit 1d6ec18

Please sign in to comment.