diff options
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/bugs/closed/shouldsucceed/2667.v | 10 | ||||
| -rw-r--r-- | test-suite/success/Scopes.v | 7 |
2 files changed, 15 insertions, 2 deletions
diff --git a/test-suite/bugs/closed/shouldsucceed/2667.v b/test-suite/bugs/closed/shouldsucceed/2667.v index d920804d2d..0631e5358d 100644 --- a/test-suite/bugs/closed/shouldsucceed/2667.v +++ b/test-suite/bugs/closed/shouldsucceed/2667.v @@ -1,5 +1,11 @@ -(* Check that not too many arguments are given to Arguments Scope *) +(* Check that extra arguments to Arguments Scope do not disturb use of *) +(* scopes in constructors *) Inductive stmt : Type := Sskip: stmt | Scall : nat -> stmt. Bind Scope Cminor with stmt. -Fail Arguments Scope Scall [_ Cminor ]. (* At most 1 argument expected *) + +(* extra argument is ok because of possible coercion to funclass *) +Arguments Scope Scall [_ Cminor ]. + +(* extra argument is ok because of possible coercion to funclass *) +Fixpoint f (c: stmt) : Prop := match c with Scall _ => False | _ => False end. diff --git a/test-suite/success/Scopes.v b/test-suite/success/Scopes.v index 55d8343efa..5b37dbd4e1 100644 --- a/test-suite/success/Scopes.v +++ b/test-suite/success/Scopes.v @@ -6,3 +6,10 @@ Module A. Definition opp := Zopp. End A. Check (A.opp 3). + +(* Test extra scopes to be used in the presence of coercions *) + +Record B := { f :> Z -> Z }. +Variable a:B. +Arguments Scope a [Z_scope]. +Check a 0. |
