Make Sil.expand_type non-recursive

Reviewed By: cristianoc

Differential Revision: D2965606

fb-gh-sync-id: 405ff31
shipit-source-id: 405ff31
master
Andrzej Kotulski 9 years ago committed by facebook-github-bot-7
parent 88881581b3
commit a83f544775

@ -3793,14 +3793,14 @@ let tenv_add tenv name typ =
| _ -> TypenameHash.replace tenv name typ | _ -> TypenameHash.replace tenv name typ
(** expand a type if it is a typename by looking it up in the type environment *) (** 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 match typ with
| Tvar tname -> | Tvar tname ->
begin begin
match tenv_lookup tenv tname with match tenv_lookup tenv tname with
| None -> assert false | None -> assert false
| Some (Tvar _) -> assert false | Some (Tvar _) -> assert false
| Some typ' -> expand_type tenv typ' | Some typ' -> typ'
end end
| _ -> typ | _ -> typ

Loading…
Cancel
Save