diff options
| -rw-r--r-- | pretyping/pretype_errors.ml | 1 | ||||
| -rw-r--r-- | test-suite/bugs/opened/shouldnotfail/2310.v | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pretyping/pretype_errors.ml b/pretyping/pretype_errors.ml index e92ab3206a..13b5704ef0 100644 --- a/pretyping/pretype_errors.ml +++ b/pretyping/pretype_errors.ml @@ -165,6 +165,7 @@ let error_unsolvable_implicit loc env sigma evi e explain = (PretypeError (env_ise sigma env, UnsolvableImplicit (evi, e, explain))) let error_cannot_unify env sigma (m,n) = + let m = nf_evar sigma m and n = nf_evar sigma n in raise (PretypeError (env_ise sigma env,CannotUnify (m,n))) let error_cannot_unify_local env sigma (m,n,sn) = diff --git a/test-suite/bugs/opened/shouldnotfail/2310.v b/test-suite/bugs/opened/shouldnotfail/2310.v new file mode 100644 index 0000000000..8d1a5149ed --- /dev/null +++ b/test-suite/bugs/opened/shouldnotfail/2310.v @@ -0,0 +1,17 @@ +(* Dependent higher-order hole in "refine" (simplified version) *) + +Set Implicit Arguments. + +Inductive Nest t := Cons : Nest (prod t t) -> Nest t. + +Definition cast A x y Heq P H := @eq_rect A x P H y Heq. + +Definition replace a (y:Nest (prod a a)) : a = a -> Nest a. + +(* This used to raise an anomaly Unknown Meta in 8.2 and 8.3beta. + It raises a regular error in 8.3 and almost succeeds with the new + proof engine: there are two solutions to a unification problem + (P:=\a.Nest (prod a a) and P:=\_.Nest (prod a a)) and refine should either + leave P as subgoal or choose itself one solution *) + +intros. refine (Cons (cast H _ y)). |
