From a83f544775d0298ef1eff7c290336b2251de18fd Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Tue, 23 Feb 2016 08:21:48 -0800 Subject: [PATCH] Make Sil.expand_type non-recursive Reviewed By: cristianoc Differential Revision: D2965606 fb-gh-sync-id: 405ff31 shipit-source-id: 405ff31 --- infer/src/backend/sil.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infer/src/backend/sil.ml b/infer/src/backend/sil.ml index 115c7c9b1..ffa0cb197 100644 --- a/infer/src/backend/sil.ml +++ b/infer/src/backend/sil.ml @@ -3793,14 +3793,14 @@ let tenv_add tenv name typ = | _ -> TypenameHash.replace tenv name typ (** expand a type if it is a typename by looking it up in the type environment *) -let rec expand_type tenv typ = +let expand_type tenv typ = match typ with | Tvar tname -> begin match tenv_lookup tenv tname with | None -> assert false | Some (Tvar _) -> assert false - | Some typ' -> expand_type tenv typ' + | Some typ' -> typ' end | _ -> typ