diff options
| author | herbelin | 2010-06-13 18:45:17 +0000 |
|---|---|---|
| committer | herbelin | 2010-06-13 18:45:17 +0000 |
| commit | 2c9c92aac97160a40ff240dec41464ae78a6c88c (patch) | |
| tree | 89db50d3c291a005b6d2a41b60227dbced874429 | |
| parent | e873d56b847011059e9590cf7536f05d33b84216 (diff) | |
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
| -rw-r--r-- | interp/constrintern.ml | 1 | ||||
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/2295.v | 11 |
2 files changed, 12 insertions, 0 deletions
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). |
