From 2c9c92aac97160a40ff240dec41464ae78a6c88c Mon Sep 17 00:00:00 2001 From: herbelin Date: Sun, 13 Jun 2010 18:45:17 +0000 Subject: Fixing bug 2295 (omission of option "as" in return clause of "match" was not working with section/goal variables). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13131 85f007b7-540e-0410-9357-904b9bb8a0f7 --- interp/constrintern.ml | 1 + test-suite/bugs/closed/shouldsucceed/2295.v | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 test-suite/bugs/closed/shouldsucceed/2295.v diff --git a/interp/constrintern.ml b/interp/constrintern.ml index 9ca0a41bd0..aff7193461 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -1260,6 +1260,7 @@ let internalise sigma globalenv env allow_patvar lvar c = [], None in let na = match tm', na with | RVar (_,id), None when Idset.mem id vars -> Name id + | RRef (loc, VarRef id), None -> Name id | _, None -> Anonymous | _, Some na -> na in (tm',(na,typ)), na::ids diff --git a/test-suite/bugs/closed/shouldsucceed/2295.v b/test-suite/bugs/closed/shouldsucceed/2295.v new file mode 100644 index 0000000000..f5ca28dcaa --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/2295.v @@ -0,0 +1,11 @@ +(* Check if omission of "as" in return clause works w/ section variables too *) + +Section sec. + +Variable b: bool. + +Definition d' := + (match b return b = true \/ b = false with + | true => or_introl _ (refl_equal true) + | false => or_intror _ (refl_equal false) + end). -- cgit v1.2.3