test(tests/lean): add unique class instance resolution test

This commit is contained in:
Leonardo de Moura 2014-10-30 14:49:11 -07:00
parent e79c7d9852
commit b87764eaf6
2 changed files with 14 additions and 0 deletions

View 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) :=
_

View 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₂