test: add test for issue #951
This commit is contained in:
parent
893b816f82
commit
d39025e343
2 changed files with 19 additions and 0 deletions
17
tests/lean/951.lean
Normal file
17
tests/lean/951.lean
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
inductive ThingA where
|
||||
| mkA
|
||||
deriving Ord
|
||||
instance : LE ThingA where
|
||||
le a b := (compare a b).isLE
|
||||
|
||||
instance (t₁ t₂ : ThingA) : Decidable (t₁ <= t₂) := inferInstance
|
||||
-- TODO: we may want to suppress the name of nested instances
|
||||
#check instDecidableLeThingAInstLEThingA
|
||||
|
||||
inductive ThingB where
|
||||
| mkB
|
||||
deriving Ord
|
||||
instance : LE ThingB where
|
||||
le a b := (compare a b).isLE
|
||||
instance (t₁ t₂ : ThingB) : Decidable (t₁ <= t₂) := inferInstance
|
||||
#check instDecidableLeThingBInstLEThingB
|
||||
2
tests/lean/951.lean.expected.out
Normal file
2
tests/lean/951.lean.expected.out
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
instDecidableLeThingAInstLEThingA : (t₁ t₂ : ThingA) → Decidable (t₁ ≤ t₂)
|
||||
instDecidableLeThingBInstLEThingB : (t₁ t₂ : ThingB) → Decidable (t₁ ≤ t₂)
|
||||
Loading…
Add table
Reference in a new issue