Skip to content

Commit

Permalink
Reserve error/warning codes for strict switches
Browse files Browse the repository at this point in the history
Summary: Reserve new error warning codes needed for strict switches.

Reviewed By: viratyosin

Differential Revision: D70592298

fbshipit-source-id: f561aead64f38ac3e01b0bfe4488b657ffe41ea9
  • Loading branch information
Mistral Contrastin authored and facebook-github-bot committed Mar 5, 2025
1 parent c13ad37 commit 31b2c63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions hphp/hack/src/errors/error_codes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ module Typing = struct
| StaticCallOnTraitRequireThisAs [@value 4486]
| NeedsConcreteOverride [@value 4487]
| StringToClassPointer [@value 4488]
| SwitchNeedsDefault [@value 4489]
(* Add new Typing codes here! Comment out when deprecating. *)
[@@deriving enum, show { with_path = false }]

Expand All @@ -803,6 +804,7 @@ module Warning = struct
| SafeAbstractCallNeedsConcrete [@value 12016]
| NoDisjointUnion [@value 12017]
| SafeAbstractConstAccess [@value 12018]
| SwitchRedundancy [@value 12019]
[@@deriving enum, ord, show { with_path = false }]
end

Expand Down
4 changes: 3 additions & 1 deletion hphp/hack/src/oxidized/gen/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
//
// @generated SignedSource<<b62582d2108b7edae9603ab7636e7bdf>>
// @generated SignedSource<<68e4b83733c67304cefadd7e120759e6>>
//
// To regenerate this file, run:
// hphp/hack/src/oxidized_regen.sh
Expand Down Expand Up @@ -602,6 +602,7 @@ pub enum Typing {
StaticCallOnTraitRequireThisAs = 4486,
NeedsConcreteOverride = 4487,
StringToClassPointer = 4488,
SwitchNeedsDefault = 4489,
}
impl TrivialDrop for Typing {}
arena_deserializer::impl_deserialize_in_arena!(Typing);
Expand Down Expand Up @@ -643,6 +644,7 @@ pub enum Warning {
SafeAbstractCallNeedsConcrete = 12016,
NoDisjointUnion = 12017,
SafeAbstractConstAccess = 12018,
SwitchRedundancy = 12019,
}
impl TrivialDrop for Warning {}
arena_deserializer::impl_deserialize_in_arena!(Warning);
Expand Down

0 comments on commit 31b2c63

Please sign in to comment.