summaryrefslogtreecommitdiff
path: root/test-suite/success/change.v
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/success/change.v')
-rw-r--r--test-suite/success/change.v21
1 files changed, 21 insertions, 0 deletions
diff --git a/test-suite/success/change.v b/test-suite/success/change.v
index 7bed7ecb..1f0b7d38 100644
--- a/test-suite/success/change.v
+++ b/test-suite/success/change.v
@@ -38,3 +38,24 @@ Fail change True with (let (x,a) := ex_intro _ True (eq_refl True) in x).
Fail change True with
match ex_intro _ True (eq_refl True) with ex_intro x _ => x end.
Abort.
+
+(* Check absence of loop in identity substitution (was failing up to
+ Sep 2014, see #3641) *)
+
+Goal True.
+change ?x with x.
+Abort.
+
+(* Check typability after change of type subterms *)
+Goal nat = nat :> Set.
+Fail change nat with (@id Type nat). (* would otherwise be ill-typed *)
+Abort.
+
+(* Check typing env for rhs is the correct one *)
+
+Goal forall n, let x := n in id (fun n => n + x) 0 = 0.
+intros.
+unfold x.
+(* check that n in 0+n is not interpreted as the n from "fun n" *)
+change n with (0+n).
+Abort.