aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/output/inference.out4
-rw-r--r--test-suite/output/inference.v13
2 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/output/inference.out b/test-suite/output/inference.out
index 16b23ed18d..e2a36cfe7c 100644
--- a/test-suite/output/inference.out
+++ b/test-suite/output/inference.out
@@ -6,3 +6,7 @@ fun e : option L => match e with
: option L -> option L
fun (m n p : nat) (H : S m <= S n + p) => le_S_n m (n + p) H
: forall m n p : nat, S m <= S n + p -> m <= n + p
+fun n : nat => let x := A n in ?17 ?20:T n
+ : forall n : nat, T n
+fun n : nat => ?25 ?28:T n
+ : forall n : nat, T n
diff --git a/test-suite/output/inference.v b/test-suite/output/inference.v
index fe537c59a7..cd9a4a12b2 100644
--- a/test-suite/output/inference.v
+++ b/test-suite/output/inference.v
@@ -15,3 +15,16 @@ Print P.
(* Check that plus is folded even if reduction is involved *)
Check (fun m n p (H : S m <= (S n) + p) => le_S_n _ _ H).
+
+
+(* Check that the heuristic to solve constraints is not artificially
+ dependent on the presence of a let-in, and in particular that the
+ second [_] below is not inferred to be n, as if obtained by
+ first-order unification with [T n] of the conclusion [T _] of the
+ type of the first [_]. *)
+
+(* Note: exact numbers of evars are not important... *)
+
+Inductive T (n:nat) : Type := A : T n.
+Check fun n (x:=A n:T n) => _ _ : T n.
+Check fun n => _ _ : T n.