From 56db96573806eae2005071d75157275a359913ce Mon Sep 17 00:00:00 2001 From: Dulma Churchill Date: Tue, 27 Feb 2018 05:38:24 -0800 Subject: [PATCH] [retain cycles] Make the id in dotty files include the field, in case the type is not unique in the cycle Reviewed By: da319 Differential Revision: D7085245 fbshipit-source-id: eea11e7 --- infer/src/backend/RetainCyclesType.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infer/src/backend/RetainCyclesType.ml b/infer/src/backend/RetainCyclesType.ml index 8847caafd..85fe71f86 100644 --- a/infer/src/backend/RetainCyclesType.ml +++ b/infer/src/backend/RetainCyclesType.ml @@ -113,7 +113,9 @@ let pp_dotty fmt cycle = let pp_dotty_id fmt element = match element with | Object obj -> - Format.fprintf fmt "%s" (Typ.to_string obj.rc_from.rc_node_typ) + Format.fprintf fmt "%s_%a" + (Typ.to_string obj.rc_from.rc_node_typ) + Typ.Fieldname.pp obj.rc_field.rc_field_name | Block name -> Format.fprintf fmt "%s" (Typ.Procname.to_unique_id name) in