diff options
author | Tej Chajed <tchajed@mit.edu> | 2017-03-22 20:35:38 -0400 |
---|---|---|
committer | Tej Chajed <tchajed@mit.edu> | 2017-03-23 11:21:55 -0400 |
commit | b1656b1f10501b34ae6a7e147f550710b935e54b (patch) | |
tree | 0b7066295e87450d832f55a4b47674eb35454325 /pretyping/patternops.ml | |
parent | 6d2802075606dcddb02dd13cbaf38ff76f8bf242 (diff) |
Intern names bound in match patterns
Fixes Coq bug 5345 (https://coq.inria.fr/bugs/show_bug.cgi?id=5345):
Cannot use names bound in matches inside Ltac definitions.
Diffstat (limited to 'pretyping/patternops.ml')
-rw-r--r-- | pretyping/patternops.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pretyping/patternops.ml b/pretyping/patternops.ml index fe73b6105..2090aad8a 100644 --- a/pretyping/patternops.ml +++ b/pretyping/patternops.ml @@ -404,7 +404,9 @@ let rec pat_of_raw metas vars = function and pats_of_glob_branches loc metas vars ind brs = let get_arg = function - | PatVar(_,na) -> na + | PatVar(_,na) -> + name_iter (fun n -> metas := n::!metas) na; + na | PatCstr(loc,_,_,_) -> err loc (Pp.str "Non supported pattern.") in let rec get_pat indexes = function |