test(tests/lean): add unique class instance resolution test
This commit is contained in:
parent
e79c7d9852
commit
b87764eaf6
2 changed files with 14 additions and 0 deletions
10
tests/lean/unique_instances.lean
Normal file
10
tests/lean/unique_instances.lean
Normal file
|
@ -0,0 +1,10 @@
|
|||
import logic data.prod
|
||||
open prod
|
||||
|
||||
set_option elaborator.unique_class_instances true
|
||||
theorem tst (A : Type) (H₁ : inhabited A) (H₂ : inhabited A) : inhabited (A × A) :=
|
||||
_
|
||||
|
||||
set_option elaborator.unique_class_instances false
|
||||
theorem tst (A : Type) (H₁ : inhabited A) (H₂ : inhabited A) : inhabited (A × A) :=
|
||||
_
|
4
tests/lean/unique_instances.lean.expected.out
Normal file
4
tests/lean/unique_instances.lean.expected.out
Normal file
|
@ -0,0 +1,4 @@
|
|||
unique_instances.lean:6:0: error: ambiguous class-instance resolution, there is more than one solution
|
||||
prod.is_inhabited H₂ H₂
|
||||
and
|
||||
prod.is_inhabited H₁ H₂
|
Loading…
Reference in a new issue