diff options
-rw-r--r-- | tactics/tacintern.ml | 8 | ||||
-rw-r--r-- | test-suite/bugs/closed/3562.v | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tactics/tacintern.ml b/tactics/tacintern.ml index 22951491b..9ca8da9d3 100644 --- a/tactics/tacintern.ml +++ b/tactics/tacintern.ml @@ -268,9 +268,11 @@ and intern_intro_pattern_action lf ist = function and intern_or_and_intro_pattern lf ist = List.map (List.map (intern_intro_pattern lf ist)) -let intern_or_and_intro_pattern_loc lf ist l = - intern_or_var (fun (loc,l) -> (loc,intern_or_and_intro_pattern lf ist l)) - ist l +let intern_or_and_intro_pattern_loc lf ist = function + | ArgVar (_,id) as x -> + if find_var id ist then x + else error "Disjunctive/conjunctive introduction pattern expected." + | ArgArg (loc,l) -> ArgArg (loc,intern_or_and_intro_pattern lf ist l) let intern_intro_pattern_naming_loc lf ist (loc,pat) = (loc,intern_intro_pattern_naming lf ist pat) diff --git a/test-suite/bugs/closed/3562.v b/test-suite/bugs/closed/3562.v new file mode 100644 index 000000000..1a1410a3b --- /dev/null +++ b/test-suite/bugs/closed/3562.v @@ -0,0 +1,6 @@ +(* Should not be an anomaly as it was at some time in + September/October 2014 but some "Disjunctive/conjunctive + introduction pattern expected" error *) + +Theorem t: True. +Fail destruct 0 as x. |