From 89876b7a19315eb5d0e255ff01c3b7855ed64703 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr>
Date: Mon, 14 Dec 2020 11:59:15 +0100
Subject: [PATCH] [Eva] Avoids widening functions: this does not work. Fixes a
 crash.

---
 src/plugins/value_types/widen_type.ml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/plugins/value_types/widen_type.ml b/src/plugins/value_types/widen_type.ml
index d49b1a0fc6d..92f57f012f4 100644
--- a/src/plugins/value_types/widen_type.ml
+++ b/src/plugins/value_types/widen_type.ml
@@ -227,7 +227,8 @@ let hints_from_keys stmt h =
       float_hints_for_base b)
 
 let var_hints stmt prio_bases =
-  { empty with priority_bases = Stmt.Map.singleton stmt prio_bases }
+  let bases = Base.Set.filter (fun b -> not (Base.is_function b)) prio_bases in
+  { empty with priority_bases = Stmt.Map.singleton stmt bases }
 
 let num_hints stmto baseo hints =
   match stmto, baseo with
-- 
GitLab