From 4e0e3022ca9eefefb57632152725b4a4c249ce38 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Tue, 17 Jun 2014 15:57:03 +0200 Subject: Fixing #3292 (locations of notations shifted by 1 in glob files in trunk). Thanks to David M. Cooke on coq-bugs for pointing out one part of the problem. --- interp/topconstr.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interp/topconstr.ml b/interp/topconstr.ml index b043f3d42..97f9429c1 100644 --- a/interp/topconstr.ml +++ b/interp/topconstr.ml @@ -262,8 +262,8 @@ let locs_of_notation loc locs ntn = let (bl, el) = Loc.unloc loc in let locs = List.map Loc.unloc locs in let rec aux pos = function - | [] -> if Int.equal pos el then [] else [(pos,el-1)] - | (ba,ea)::l ->if Int.equal pos ba then aux ea l else (pos,ba-1)::aux ea l + | [] -> if Int.equal pos el then [] else [(pos,el)] + | (ba,ea)::l -> if Int.equal pos ba then aux ea l else (pos,ba)::aux ea l in aux bl (List.sort (fun l1 l2 -> fst l1 - fst l2) locs) let ntn_loc loc (args,argslist,binderslist) = -- cgit v1.2.3