aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-11-16 12:46:24 +0100
committerPierre-Marie Pédrot2020-11-16 12:46:24 +0100
commitabde1139c8ce29ad4acd745b9ebf93be9cd1ee1c (patch)
treec2eccde79794b1cf7d92bec93ac53adb77ed1a4f /test-suite
parent57fb6f106f24d2fa1e66a8ac813525f804a7ced7 (diff)
parent4a6a7ea381192d86dfb63d2dce37fcabad5e6a3b (diff)
Merge PR #12685: Propagating scope information in indirect application to a reference.
Ack-by: SkySkimmer Reviewed-by: ppedrot
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/Notations2.v4
-rw-r--r--test-suite/success/Scopes.v12
2 files changed, 14 insertions, 2 deletions
diff --git a/test-suite/success/Notations2.v b/test-suite/success/Notations2.v
index 382c252727..fb8bbfd043 100644
--- a/test-suite/success/Notations2.v
+++ b/test-suite/success/Notations2.v
@@ -51,8 +51,8 @@ Check fun A (x : prod' bool A) => match x with (@pair' _ 0) _ y 0%bool => 2 | _
Notation c3 x := ((@pair') _ x).
Check (@pair') _ 0%bool _ 0%bool 0%bool : prod' bool bool. (* @ is blocking implicit and scopes *)
Check ((@pair') _ 0%bool) _ 0%bool 0%bool : prod' bool bool. (* parentheses and @ are blocking implicit and scopes *)
-Check c3 0 0 0 : prod' nat bool. (* First scope is blocked but not the last two scopes *)
-Check fun A (x :prod' nat A) => match x with c3 0 y 0 => 2 | _ => 1 end.
+Check c3 0 0 0 : prod' bool bool.
+Check fun A (x :prod' bool A) => match x with c3 0 y 0 => 2 | _ => 1 end.
(* 4. Abbreviations do not stop implicit arguments to be inserted and scopes to be used *)
(* unless an atomic @ is given *)
diff --git a/test-suite/success/Scopes.v b/test-suite/success/Scopes.v
index 06697af901..8b7d239dcd 100644
--- a/test-suite/success/Scopes.v
+++ b/test-suite/success/Scopes.v
@@ -26,3 +26,15 @@ Definition c := ε : U.
Goal True.
assert (nat * nat).
Abort.
+
+(* Check propagation of scopes in indirect applications to references *)
+
+Module PropagateIndirect.
+Notation "0" := true : bool_scope.
+
+Axiom f : bool -> bool -> nat.
+Check (@f 0) 0.
+
+Record R := { p : bool -> nat }.
+Check fun r => r.(@p) 0.
+End PropagateIndirect.