diff --git a/Changes b/Changes index 8c1101ae0..4a6b3e52e 100644 --- a/Changes +++ b/Changes @@ -172,8 +172,8 @@ Compilers: * PR#4231, PR#5461: warning 31 is now fatal by default (Warning 31: A module is linked twice in the same executable.) - This is an interim solution; double-linking of modules has dangerous semantics, - eg. exception constructors end up with two distinct declarations. + This is an interim solution; double-linking of modules has dangerous + semantics, eg. exception constructors end up with two distinct declarations. (Alain Frisch) - PR#4800: better compilation of tuple assignment diff --git a/parsing/parser.mly b/parsing/parser.mly index 577595e34..58c8a42bd 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -1229,7 +1229,8 @@ class_sig_field: { mkctf (Pctf_inherit $3) ~attrs:($2@$4) ~docs:(symbol_docs ()) } | VAL attributes value_type post_item_attributes { mkctf (Pctf_val $3) ~attrs:($2@$4) ~docs:(symbol_docs ()) } - | METHOD attributes private_virtual_flags label COLON poly_type post_item_attributes + | METHOD attributes private_virtual_flags label COLON poly_type + post_item_attributes { let (p, v) = $3 in mkctf (Pctf_method ($4, p, v, $6)) ~attrs:($2@$7) ~docs:(symbol_docs ()) diff --git a/testsuite/tests/lib-hashtbl/htbl.ml b/testsuite/tests/lib-hashtbl/htbl.ml index 1fa88f870..12550f4d5 100644 --- a/testsuite/tests/lib-hashtbl/htbl.ml +++ b/testsuite/tests/lib-hashtbl/htbl.ml @@ -256,7 +256,9 @@ let () = let h = Hashtbl.create 16 in for i = 1 to 1000 do Hashtbl.add h i (i * 2) done; Printf.printf "%i elements\n" (Hashtbl.length h); - Hashtbl.filter_map_inplace (fun k v -> if k mod 100 = 0 then ((*Hashtbl.add h v v;*) Some (v / 100)) else None) h; + Hashtbl.filter_map_inplace (fun k v -> + if k mod 100 = 0 then ((*Hashtbl.add h v v;*) Some (v / 100)) else None) + h; let l = Hashtbl.fold (fun k v acc -> (k, v) :: acc) h [] in let l = List.sort compare l in List.iter (fun (k, v) -> Printf.printf "%i,%i\n" k v) l; diff --git a/testsuite/tests/typing-gadts/pr7222.ml b/testsuite/tests/typing-gadts/pr7222.ml index 2e1ac7e54..26b8a0371 100644 --- a/testsuite/tests/typing-gadts/pr7222.ml +++ b/testsuite/tests/typing-gadts/pr7222.ml @@ -1,4 +1,4 @@ -type +'a n = private int +type +'a n = private int type nil = private Nil_type type (_,_) elt = | Elt_fine: 'nat n -> ('l,'nat * 'l) elt diff --git a/testsuite/tests/typing-modules-bugs/pr7182_ok.ml b/testsuite/tests/typing-modules-bugs/pr7182_ok.ml index a122fa9a3..e7d019565 100644 --- a/testsuite/tests/typing-modules-bugs/pr7182_ok.ml +++ b/testsuite/tests/typing-modules-bugs/pr7182_ok.ml @@ -1,3 +1,3 @@ module rec M : sig external f : int -> int = "%identity" end - = struct external f : int -> int = "%identity" end + = struct external f : int -> int = "%identity" end diff --git a/testsuite/tests/typing-safe-linking/Makefile b/testsuite/tests/typing-safe-linking/Makefile index 3b33faf09..a1e8aba8c 100644 --- a/testsuite/tests/typing-safe-linking/Makefile +++ b/testsuite/tests/typing-safe-linking/Makefile @@ -13,4 +13,3 @@ clean: BASEDIR=../.. include $(BASEDIR)/makefiles/Makefile.common - diff --git a/testsuite/tests/typing-safe-linking/a.ml b/testsuite/tests/typing-safe-linking/a.ml index 030242bd1..6c4ca42e7 100644 --- a/testsuite/tests/typing-safe-linking/a.ml +++ b/testsuite/tests/typing-safe-linking/a.ml @@ -1,5 +1,5 @@ type _ t = X of string - | Y : bytes t + | Y : bytes t let y : string t = Y