Fix #7119 (@@@warning attribute not persistent from one toplevel phrase to the next one).
parent
074daaee8e
commit
b626516a32
6
Changes
6
Changes
|
@ -256,8 +256,10 @@ Toplevel and debugger:
|
|||
(Valentin Gatien-Baron, review by Jérémie Dimino)
|
||||
- PR#7098: Loss of ppx context in toplevel after an exception
|
||||
(Alain Frisch, report by whitequark)
|
||||
- PR#7101: The toplevel does not close in_channel for libraries specified on its command line
|
||||
(Alain Frisch)
|
||||
- PR#7101: The toplevel does not close in_channel for libraries specified on
|
||||
its command line (Alain Frisch)
|
||||
- PR#7119: ocaml doesn't respect [@@@warning] (Alain Frisch, report by
|
||||
Gabriel Radanne)
|
||||
|
||||
Other libraries:
|
||||
* Unix library: channels created by Unix.in_channel_of_descr or
|
||||
|
|
|
@ -1454,10 +1454,10 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope =
|
|||
(* moved to genannot *)
|
||||
List.iter (function {pstr_loc = l} -> Stypes.record_phrase l) sstr;
|
||||
let previous_saved_types = Cmt_format.get_saved_types () in
|
||||
Builtin_attributes.warning_enter_scope ();
|
||||
if not toplevel then Builtin_attributes.warning_enter_scope ();
|
||||
let (items, sg, final_env) = type_struct env sstr in
|
||||
let str = { str_items = items; str_type = sg; str_final_env = final_env } in
|
||||
Builtin_attributes.warning_leave_scope ();
|
||||
if not toplevel then Builtin_attributes.warning_leave_scope ();
|
||||
Cmt_format.set_saved_types
|
||||
(Cmt_format.Partial_structure str :: previous_saved_types);
|
||||
str, sg, final_env
|
||||
|
|
Loading…
Reference in New Issue