aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2006-10-25 21:37:37 +0000
committerherbelin2006-10-25 21:37:37 +0000
commit32f5e926ed646fcdba6ae45141d2a6d5b3ae738a (patch)
tree1bf8e515069e98690536245b0e30de56b396eb4e
parente877a89971f17782d05a4f27f7d17497ebd98371 (diff)
Applatissement des noeuds application vide dans le filtrage Ltac (ex:
None ne filtrait pas None à cause d'un PApp parasite) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9280 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--pretyping/matching.ml2
-rw-r--r--test-suite/success/ltac.v7
2 files changed, 9 insertions, 0 deletions
diff --git a/pretyping/matching.ml b/pretyping/matching.ml
index 9f580b851d..cac06d2408 100644
--- a/pretyping/matching.ml
+++ b/pretyping/matching.ml
@@ -119,6 +119,8 @@ let matches_core convert allow_partial_app pat c =
| PSort (RType _), Sort (Type _) -> sigma
+ | PApp (p, [||]), _ -> sorec stk sigma p t
+
| PApp (PApp (h, a1), a2), _ ->
sorec stk sigma (PApp(h,Array.append a1 a2)) t
diff --git a/test-suite/success/ltac.v b/test-suite/success/ltac.v
index 9eb5dda721..3f25f70354 100644
--- a/test-suite/success/ltac.v
+++ b/test-suite/success/ltac.v
@@ -168,3 +168,10 @@ Goal forall a b c, a=0 -> b=c+a.
intros.
revert a b c H.
Abort.
+
+(* Used to fail until revision 9280 because of a parasitic App node with
+ empty args *)
+
+Goal True.
+match None with @None => exact I end.
+Abort.