diff --git a/infer/src/IR/AccessExpression.ml b/infer/src/IR/AccessExpression.ml index c5c0e06fc..1516b8763 100644 --- a/infer/src/IR/AccessExpression.ml +++ b/infer/src/IR/AccessExpression.ml @@ -8,10 +8,14 @@ open! IStd module F = Format +type typ_ = Typ.t + +let compare_typ_ _ _ = 0 + type t = | Base of AccessPath.base | FieldOffset of t * Typ.Fieldname.t - | ArrayOffset of t * Typ.t * t list + | ArrayOffset of t * typ_ * t list | AddressOf of t | Dereference of t [@@deriving compare] diff --git a/infer/src/IR/AccessPath.ml b/infer/src/IR/AccessPath.ml index 1a43b66b2..3b6af7622 100644 --- a/infer/src/IR/AccessPath.ml +++ b/infer/src/IR/AccessPath.ml @@ -19,13 +19,13 @@ module Raw = struct let equal_base = [%compare.equal: base] - type access = ArrayAccess of Typ.t * t list | FieldAccess of Typ.Fieldname.t + type access = ArrayAccess of typ_ * t list | FieldAccess of Typ.Fieldname.t and t = base * access list [@@deriving compare] let equal_access = [%compare.equal: access] - let equal_access_list l1 l2 = Int.equal (List.compare compare_access l1 l2) 0 + let equal_access_list = [%compare.equal: access list] let may_pp_typ fmt typ = if Config.debug_level_analysis >= 3 then F.fprintf fmt ":%a" (Typ.pp Pp.text) typ