Guard one more instance of Env.add_type
parent
dc5a38f8b0
commit
28284cdd6c
|
@ -1341,7 +1341,7 @@ let set_type_used_callback name td callback =
|
|||
else let key = (name, loc) in
|
||||
let old =
|
||||
try Hashtbl.find type_declarations key
|
||||
with Not_found -> assert false
|
||||
with Not_found -> ignore
|
||||
in
|
||||
Hashtbl.replace type_declarations key (fun () -> callback old)
|
||||
|
||||
|
|
|
@ -114,7 +114,8 @@ let enter_type rec_flag env sdecl id =
|
|||
type_unboxed = unboxed_false_default_false;
|
||||
}
|
||||
in
|
||||
Env.add_type ~check:true id decl env
|
||||
Builtin_attributes.warning_scope decl.type_attributes
|
||||
(fun () -> Env.add_type ~check:true id decl env)
|
||||
|
||||
let update_type temp_env env id loc =
|
||||
let path = Path.Pident id in
|
||||
|
|
Loading…
Reference in New Issue