From 6af9f644b64acf485c1628247f5435d09b990b79 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Wed, 16 Sep 2015 06:41:04 +0200 Subject: Properly handle {|...|} patterns when patterns are not asymmetric. (Fix bug #4268) --- interp/constrintern.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'interp') diff --git a/interp/constrintern.ml b/interp/constrintern.ml index ecaf2b8c13..c754f1910c 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -1142,7 +1142,11 @@ let drop_notations_pattern looked_for = sort_fields false loc l (fun _ l -> (CPatAtom (loc, None))::l) in begin match sorted_fields with | None -> RCPatAtom (loc, None) - | Some (_, head, pl) -> + | Some (n, head, pl) -> + let pl = + if !oldfashion_patterns then pl else + let pars = List.make n (CPatAtom (loc, None)) in + List.rev_append pars pl in match drop_syndef top env head pl with |Some (a,b,c) -> RCPatCstr(loc, a, b, c) |None -> raise (InternalizationError (loc,NotAConstructor head)) -- cgit v1.2.3