1 // Copyright (c) Facebook, Inc. and its affiliates.
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
5 use crate::reason::Reason;
6 use eq_modulo_pos::EqModuloPos;
8 use serde::{Deserialize, Serialize};
10 #[derive(Clone, Debug, Eq, EqModuloPos, Hash, PartialEq, Serialize, Deserialize)]
11 #[serde(bound = "R: Reason")]
12 pub enum Primary<R: Reason> {
13 InvalidTypeHint(R::Pos),
14 ExpectingTypeHint(R::Pos),
15 ExpectingReturnTypeHint(R::Pos),
16 CyclicClassDef(R::Pos, Vec<TypeName>),
19 parent_kind: oxidized::ast_defs::ClassishKind,
20 parent_name: TypeName,
22 kind: oxidized::ast_defs::ClassishKind,