diff options
| author | Maxime Dénès | 2019-12-03 11:02:37 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2019-12-03 11:02:37 +0100 |
| commit | de91f71b2e25e66ba4dd1f1db6582f5fea205591 (patch) | |
| tree | d9c7671a07c0412491c93d847bd9aac7b085e838 /test-suite | |
| parent | 80401463e3f217be770959a646e1f87f5c8d2d5a (diff) | |
| parent | bfae260f7ba026e17e0cc599b8507bd133c4edc0 (diff) | |
Merge PR #11162: [CS] support #[local] attribute
Ack-by: SkySkimmer
Reviewed-by: Zimmi48
Reviewed-by: maximedenes
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/success/CanonicalStructure.v | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test-suite/success/CanonicalStructure.v b/test-suite/success/CanonicalStructure.v index b8cae47196..e6d674c1e6 100644 --- a/test-suite/success/CanonicalStructure.v +++ b/test-suite/success/CanonicalStructure.v @@ -29,3 +29,25 @@ Canonical Structure bool_test := mk_test (fun x y => x || y). Definition b := bool. Check (fun x : b => x != x). + +Inductive four := x0 | x1 | x2 | x3. +Structure local := MKL { l : four }. + +Section X. + Definition s0 := MKL x0. + #[local] Canonical Structure s0. + Check (refl_equal _ : l _ = x0). + + #[local] Canonical Structure s1 := MKL x1. + Check (refl_equal _ : l _ = x1). + + Local Canonical Structure s2 := MKL x2. + Check (refl_equal _ : l _ = x2). + +End X. +Fail Check (refl_equal _ : l _ = x0). +Fail Check (refl_equal _ : l _ = x1). +Fail Check (refl_equal _ : l _ = x2). +Check s0. +Check s1. +Check s2. |
