diff --git a/src/context/common.ml b/src/context/common.ml index e52759a0078..63e491db8cc 100644 --- a/src/context/common.ml +++ b/src/context/common.ml @@ -1102,7 +1102,7 @@ let get_entry_point com = let c = match m.m_statics with | Some c when (PMap.mem "main" c.cl_statics) -> c - | _ -> ExtList.List.find_map (fun t -> match t with TClassDecl c when c.cl_path = path -> Some c | _ -> None) m.m_types + | _ -> Option.get (ExtList.List.find_map (fun t -> match t with TClassDecl c when c.cl_path = path -> Some c | _ -> None) m.m_types) in let e = Option.get com.main in (* must be present at this point *) (snd path, c, e) diff --git a/src/optimization/inline.ml b/src/optimization/inline.ml index 6d432bfa1c0..6a889e220e1 100644 --- a/src/optimization/inline.ml +++ b/src/optimization/inline.ml @@ -114,10 +114,10 @@ let api_inline ctx c field params p = let mk_typeexpr path = let m = (try Hashtbl.find ctx.g.modules path with Not_found -> die "" __LOC__) in add_dependency ctx.m.curmod m; - ExtList.List.find_map (function + Option.get (ExtList.List.find_map (function | TClassDecl cl when cl.cl_path = path -> Some (make_static_this cl p) | _ -> None - ) m.m_types + ) m.m_types) in let eJsSyntax () = mk_typeexpr (["js"],"Syntax") in