From ca2699842d277fe81778cb3bfd672880632ecb71 Mon Sep 17 00:00:00 2001 From: Sam Blackshear Date: Sat, 8 Aug 2015 09:36:01 -0600 Subject: [PATCH] [Infer][nullable] Fixing bad error messages when dereferencing null literal --- infer/src/backend/rearrange.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/backend/rearrange.ml b/infer/src/backend/rearrange.ml index 826672684..a57e56bf9 100644 --- a/infer/src/backend/rearrange.ml +++ b/infer/src/backend/rearrange.ml @@ -939,7 +939,7 @@ let check_dereference_error pdesc (prop : Prop.normal Prop.t) lexp loc = list_exists (fun hpred -> match hpred with - | Sil.Hpointsto (Sil.Lvar pvar, Sil.Eexp (exp, _), _) + | Sil.Hpointsto (Sil.Lvar pvar, Sil.Eexp (Sil.Var _ as exp, _), _) when Sil.exp_equal exp deref_exp && Annotations.param_is_nullable pvar ann_sig -> nullable_obj_str := Sil.pvar_to_string pvar; true